AWK Quick
Columns
Most of the time when you use awk from the command line, you're doing something simple like this: ps -ef | grep netscape | awk '{print $2}' To save typing, use this script when you only want to use awk to print out one or more columns: #!/bin/ksh
p=\$$( echo $1 | sed 's/,/,\$/g' )
# eof -------------------------------------------------------------------------------- Now you can do things like: ps -ef | awkc 2,1
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|