![]() |
|
|
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 |
| error: field has incomplete type | boyanov | High Level Programming | 4 | 08-10-2007 05:15 AM |
| Retrieve 5th Field to Last Field !! | jobbyjoseph | UNIX for Dummies Questions & Answers | 3 | 05-16-2007 04:20 AM |
| Correct the error plz | Mandab | Shell Programming and Scripting | 2 | 05-11-2007 02:15 PM |
| Moving Part of a field to another field using AWK | rjsha1 | Shell Programming and Scripting | 5 | 08-04-2006 06:39 AM |
| add increment field when first field changes | azekry | Shell Programming and Scripting | 2 | 11-14-2005 04:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Error : Field $() is not correct
Hi All,
I'm new to shell scripting. Trying to extract substring using awk script as shown below : Flag=$1 Length=`echo ${#Flag}` NewLen=$Length-2 NewFlag=`echo $Flag|awk '{print substr($Flag,0,$NewLen)}'` echo "New string is : $NewFlag" exit When I execute this script the following error message appears : awk: 0602-562 Field $() is not correct. The input line number is 1. The source line number is 1. Could you please guide me to resolve this error. Thanks in advance. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|