Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
- The problem statement, all variables and given/known data:
i have the output of a csh script piped to an awk script. In the awk script i was trying to assign a variable with the output of a command, the problem is when i use the quote ' or ` it gave me syntax error and when i use " it printed out the command instead of its expected output
- Relevant commands, code, scripts, algorithms:
#!/bin/csh
./a_script | awk 'BEGIN { FS="." } { num = "cat $argv[1] | grep $0 | wc -l"; printf "%s %s %s\n", $1, $0, num }'
- The attempts at a solution (include all code and scripts):
the above
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Southampton, Bob Damper, comp1005
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).