![]() |
|
|
|
|
|||||||
| 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 |
| string manipulation | Cactus Jack | Shell Programming and Scripting | 9 | 02-14-2008 10:14 AM |
| awk manipulation | Nicol | Shell Programming and Scripting | 2 | 07-05-2006 12:51 AM |
| More log manipulation | StevePace | Shell Programming and Scripting | 8 | 02-13-2006 12:20 AM |
| Help with log manipulation | StevePace | Shell Programming and Scripting | 3 | 01-31-2006 05:28 PM |
| manipulation | vivekshankar | UNIX for Dummies Questions & Answers | 13 | 05-19-2005 12:45 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Coded in my script:
#!/bin/ksh I have a variable in the format of YYYYMMDD: $latest_bus_date_yyyymmdd I need to create a new variable in the format of MMDDYYYY: $latest_bus_date_mmddyyyy I want to take the information from $latest_bus_date_yyyymmdd and reformat it to be stored in the new variable. Any ideas on how to do this? Thanks for any suggestions! Last edited by blt123; 03-04-2002 at 11:17 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
I can't exactly parse your question, but I think this is what you want:
x=20020227 y=${x#????}${x%????} echo $y |
|
#3
|
|||
|
|||
|
Thank you - it worked!
|
|||
| Google The UNIX and Linux Forums |