![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replacing a string in nth line | maxmave | Shell Programming and Scripting | 1 | 06-04-2008 02:32 PM |
| To cut end string from line | visu | Shell Programming and Scripting | 7 | 12-20-2007 10:22 PM |
| regexp to get first line of string | jonas.gabriel | Shell Programming and Scripting | 3 | 05-09-2007 12:46 AM |
| How I Can get String From the Line | habuzahra | UNIX for Dummies Questions & Answers | 2 | 10-29-2006 03:55 AM |
| Add string after line X | alienET | Shell Programming and Scripting | 2 | 10-13-2005 06:52 PM |
|
|
LinkBack | Thread Tools | 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 |
| Forum Sponsor | ||
|
|
|
|||
|
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}' .
Thanks |