Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
awk to print last parameter
Name: jbeaudoi Date: April 6, 2005 at 03:05:39 Pacific OS: Win XP CPU/Ram: 1024
Comment:
Hi could anyone help me print out the last parameter of a line usd=ing awk and a field delimiter?
For example... Input : Dir/dir/dir/file awk -F / {print last parameter}
I can't use print $4 since I don't know how many subdirs there are.
Summary: Hi How do I get awk to print out the name of a file instead of the contents. I'm currently writing a csh script that looks like this. #!/bin/csh set previous = $6 if($6 == "")then ./anotherscri...
Summary: Hi: Jimbo's solution is good, but if you really need to eliminate the (n)awk call, you can use the shell: #!/bin/ksh print "Enter the first column to print \c " read COL1 print "Enter the second colum...
Summary: I need to be able to print the last few pages (or lines) of a very large file. Can anyone help me out? I know how to print the whole thing,and I know how to VIEW the last few lines. Thank you!! ...