![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| How to: Parse text string into variables using Korn shell | shew01 | Shell Programming and Scripting | 7 | 05-23-2008 07:01 AM |
| Parse String Using Sed | racbern | Shell Programming and Scripting | 4 | 04-23-2008 09:14 AM |
| how to parse this string | hcliff | Shell Programming and Scripting | 13 | 04-02-2008 01:43 AM |
| How can I parse a record found in /etc/passwd into variables? | shew01 | Shell Programming and Scripting | 7 | 12-17-2007 08:23 AM |
| How to parse config variables from external file to shell script | pradsh | Shell Programming and Scripting | 2 | 07-09-2007 11:21 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
How to parse a string into variables
I'm working in korn shell and have a variable which contains a string like:
aa_yyyymmdd_bbb_ccc_ddd.abc. I want to treat the _ and . as delimiters and parse the string so I end up with 6 values in variables that I can manipulate. My original plan was to use var1=`echo $sting1 | cut -c1-c2` but now the requirements have changed so the position is no longer fixed. Please help. |
| Forum Sponsor | ||
|
|