If I say:
Code: Select all
output="$(ls -l)"
echo output
If I say:
Code: Select all
output = "$(awk '/Tile/ {match($0, /Tile/); print substr($0, RSTART+5, RLENGTH+20);}' /blender.txt)"
The command without the output="$(....)" returns the correct and expected results.
So, why does the second command, which is correct, not work? I'm guessing there's a clash of ' or ) or ", I've tried loads of combinations but I can't get the output into output.
Many thanks.