Home > Mobile >  Shell script error "filename.json is a directory"
Shell script error "filename.json is a directory"

Time:07-06

Im using the below shell script in an Azure Devops pipeline as an inline script. The files are there and in correct location. However it is intepreted as a directory? Tried the path with and without quotes...

Error: "sort: read failed: /home/vsts/work/1/s/Oldtemplate/filename.json: Is a directory"

Code:

comm -13 <(sort -u "/home/vsts/work/1/s/Oldtemplate/filename.json") <(sort -u "/home/vsts/work/1/s/filename.json") > "/home/vsts/work/1/s/SomeFile.txt"

CodePudding user response:

Is the file in the same folder as your script?

CodePudding user response:

So, the file was downloaded through Azcopy withs source = folder, not file. Filename.json ended up as a directory (with permissions: "drwxrwxrwx"). Fixed the azcopy source and now it works. Thanks all :)

  • Related