![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to extract last occurence of the field | kcp_pavan | Shell Programming and Scripting | 3 | 03-12-2009 05:17 AM |
| extract a field by logic | ChicagoBlues | UNIX for Dummies Questions & Answers | 4 | 01-27-2009 02:00 PM |
| need to extract field of characters in a line | jansat | Shell Programming and Scripting | 3 | 05-22-2008 09:44 AM |
| How to extract field from variable more efective | pp56825 | Shell Programming and Scripting | 11 | 01-19-2008 10:34 AM |
| Extract Part of string from 3rd field $3 using AWK | stakuri | Shell Programming and Scripting | 4 | 10-10-2007 12:28 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Extract third field of third line
Hi, how do I extract the third field of the first line?
I know how to get the first line or the third field of a file, but I can't get the single entry. awk 'NR==1' file.txt awk '{print $3}' file.txt Please tell me how to combine these. And how do I set this value into a variable? var='awk "NR==1" file.txt' ? But now I have to "eval" this $var, right? I want to use $var in another expression. Thanks for your help. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|