screwloose
MIS
This solution from PHV worked great:
awk '/pag/{$1="";printf "%d)\t%s\n",++i,$0}' /path/to/input
I have been looking for an answer on the net, however, lacking any great skill with awk, how do I pass in "pag" as a variable? In ksh, of course, if I wanted to pass it from the command line I could do something like:
$0 variable
Which would pass variable into "pag" if it was $1, however that doesn't work in awk and I cannot find a way to do it.
Thanks!
awk '/pag/{$1="";printf "%d)\t%s\n",++i,$0}' /path/to/input
I have been looking for an answer on the net, however, lacking any great skill with awk, how do I pass in "pag" as a variable? In ksh, of course, if I wanted to pass it from the command line I could do something like:
$0 variable
Which would pass variable into "pag" if it was $1, however that doesn't work in awk and I cannot find a way to do it.
Thanks!