I'm trying to search through a set of files and extract paragraphs. I have a script that works just fine from the command line but cannot get it to work using 'Execute Shell Script'.
The 'echo' command works, so I believe the variable is passing just fine, but there's something about the awk command this is stopping it from working correctly.
The following works fine if I open terminal and paste this in (using KM):
Read the section in the Execute a Shell Script documentation (which you can get to by selecting Help from the gear menu) on Quoting Strings.
The primary reason for your problem is that you are quoting the parameter to awk in single quotes (') which do not interpolate shell variables. The Quoting Strings section explains some solutions.
Also, this StackOverflow:
is helpful for describing how to use shell variables in awk.