![]() |
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 |
| 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 |
| Search, replace string in file1 with string from (lookup table) file2? | gstuart | Shell Programming and Scripting | 9 | 06-08-2009 06:11 AM |
| Search a string and append text after the string | kesu2k | Shell Programming and Scripting | 8 | 07-18-2008 07:35 PM |
| Extracting a string from one file and searching the same string in other files | mohancrr | Shell Programming and Scripting | 1 | 09-19-2007 03:17 AM |
| appending string to text file based on search string | malaymaru | Shell Programming and Scripting | 1 | 06-09-2006 08:53 AM |
| sed problem - replacement string should be same length as matching string. | amangeles | Shell Programming and Scripting | 4 | 01-11-2006 06:11 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||||
|
Actually,
it could be easily done in shell without any external command (unless, as already stated, there is another reason to use AWK in this particular case): Code:
% s=a:b:c % (IFS=:;set -- $s;printf "$3\n") c Code:
zsh-4.3.4% print ${${(s.:.)s}[3]}
c
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| awk, input |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|