![]() |
|
|
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 |
| get substr? | syamkp | Shell Programming and Scripting | 6 | 03-31-2008 03:08 AM |
| awk or substr | ramky79 | UNIX for Dummies Questions & Answers | 3 | 03-13-2007 08:18 PM |
| Substr | deepakwins | UNIX for Dummies Questions & Answers | 9 | 02-14-2007 12:58 AM |
| How to use awk substr ? | sabercats | Shell Programming and Scripting | 1 | 02-10-2006 07:01 PM |
| awk substr? | MizzGail | Shell Programming and Scripting | 2 | 03-14-2003 01:50 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
substr not working
Hi I am trying to run this command in ksh ...its not working
$line="123356572867116w1671716" actual_length = 16 cut_line=`awk 'BEGIN{print substr(ARGV[1],1,actual_length)}' "$line"` the substr is not giving me an output how can i make it done can anyone hwlp me on this cut_line=`awk 'BEGIN{print substr(ARGV[1],1,16)}' "$line"` This is working ...But I want variable to be passed instead of numeric please guide me Thanks, |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|