![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replacing a string in nth line | maxmave | Shell Programming and Scripting | 1 | 06-04-2008 06:32 PM |
| To cut end string from line | visu | Shell Programming and Scripting | 7 | 12-21-2007 02:22 AM |
| regexp to get first line of string | jonas.gabriel | Shell Programming and Scripting | 3 | 05-09-2007 04:46 AM |
| How I Can get String From the Line | habuzahra | UNIX for Dummies Questions & Answers | 2 | 10-29-2006 07:55 AM |
| Add string after line X | alienET | Shell Programming and Scripting | 2 | 10-13-2005 10:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi all,
New here and new to shell as well. Currently I have a problem when use echo $1 | awk -F\| '{print NF}' to get the NF of input string separated by "|". There's input contains more than 100 fields, then I have error awk: record `dd|14/06/2003|ssssss...' has too many fields . What do I solve this problem? Thanks |
|
||||
|
since the awk can't handle 100+ fields. what do I use to get one of the field value, say field 45. Currently I am using Code:
echo $1|awk -F\| '{print $45}' .
And I don't know why I can't get gawk command in my environment. Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|