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:
couldn't print out stored variable in awk
Relevant commands, code, scripts, algorithms:
i have in a foreach loop:
set num=`blah blah`
if ( $num != "0" ) then
echo $x | awk 'BEGIN { FS="." } { printf "%s %s %s\n", $1, $0, num }'
else return
endif
end
im wondering why awk just couldnt print '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):
Uni of Southampton, so on
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).
awk -v num="$num" is the preferred way, awk -v num=$num will break if $num contains spaces or certain special characters (this is not a shell assignment) ...