Category : bash

When running below command directly in bash shell, I am able to get the output. But when I am passing it via BASH script getting access denied. Any help would be appreciated $ jq -r ‘.id’ Repooutput.txt dad04f6d-4e06-4420-b0bc-cb2dcfee2dcf Error: $ sh test.sh test.sh: line 3: /c/ProgramData/chocolatey/bin/jq: Permission denied Source: Windows..

Read more

What possible things could cause sys.stdin to have to be opened twice to read input from a pipe? Doesn’t work: #!/usr/bin/env python3 import sys stdin = sys.stdin.read() for line in stdin.splitlines(): print(line) Works: #!/usr/bin/env python3 import sys stdin = sys.stdin.read() stdin = sys.stdin.read() for line in stdin.splitlines(): print(line) This is when piped in bash, like ..

Read more