If the output from the command is just supposed to provide arguments for run.sh, there's no need to use xargs. You can just use bash command substitution.
If you want the output to provide multiple white-space separated tokens:
Code:
./run.sh pkg $(grep -P "^[a-zA-Z0-9:]+\s+package" ctags_output.proc | awk '{print $1}')
If you want one single argument, then quote the command substitution expression:
Code:
./run.sh pkg "$(grep -P "^[a-zA-Z0-9:]+\s+package" ctags_output.proc | awk '{print $1}')"
If it still doesn't work, then run your script with the -x argument to get debugging output so you can figure out what's going wrong, as in:
Code:
bash -x ./run.sh pkg $(grep -P "^[a-zA-Z0-9:]+\s+package" ctags_output.proc | awk '{print $1}')
Bookmarks