![]() |
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 |
| Parse for errors shell script | bubba112557 | Shell Programming and Scripting | 2 | 04-02-2009 11:25 AM |
| How to: Parse text string into variables using Korn shell | shew01 | Shell Programming and Scripting | 7 | 05-23-2008 10:01 AM |
| Parse a string in XML file using shell script | ayhanne | Shell Programming and Scripting | 46 | 01-09-2008 12:33 PM |
| split files by specifying a string (bash shell) | vikas027 | Shell Programming and Scripting | 12 | 11-01-2007 01:57 PM |
| How to parse config variables from external file to shell script | pradsh | Shell Programming and Scripting | 2 | 07-09-2007 02:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell script to parse/split input string and display the tokens
Hi,
How do I parse/split lines (strings) read from a file and display the individual tokens in a shell script? Given that the length of individual lines is not constant and number of tokens in each line is also not constant. The input file could be as below: one~two~three~four~five~six 11~12~13~14~15 AAA~BBB~CC~DD~EEEE~FFF~GGGGG Output should be : Line 1 one two three four five six Line 2 11 12 13 14 15 Line 3 AAA BBB CC DD EEEE FF GGGGG Your help/hints are highly appreciated. Thank you, Ajay |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|