0

I'm trying to run a bash script from inside my current one with the following command:

output=$(bash ./read.sh -f "$file" -c "$ARG1_COLUMN" -e "$ARG2_PATTERN")

read.sh is in the same dir as my current script and I've ensured that the flags and args are not null and have the values necessary.

when I try to echo "$output", I get a blank line

any ideas?

Mathew
  • 235
  • 1
    Well, what does ./read.sh contain? What does bash ./read.sh -f "$file" -c "$ARG1_COLUMN" -e "$ARG2_PATTERN" print? – ilkkachu Oct 20 '23 at 21:49
  • It doesn't matter if it's in the same directory as the current script. Pathnames are interpreted relative to the user's working directory, not the directory of the script. – Barmar Oct 20 '23 at 23:01
  • So try using the absolute pathname of read.sh instead of ./ – Barmar Oct 20 '23 at 23:02

0 Answers0