![]() |
|
|
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 |
| How to use Perl to merge multi-line into single line | happyday | Shell Programming and Scripting | 3 | 05-11-2009 05:42 AM |
| Writing a simple loop in perl | docdudetheman | Shell Programming and Scripting | 3 | 04-08-2009 03:05 PM |
| Perl script to search a line and copy it to another line | ammu | Shell Programming and Scripting | 3 | 12-29-2008 05:12 PM |
| simple socket programming in perl | zedex | Shell Programming and Scripting | 2 | 08-23-2008 06:31 PM |
| a simple perl | gusla | UNIX for Dummies Questions & Answers | 3 | 04-17-2002 03:01 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi Guys,
If want to change the string "09-06-11" to "11062009", i can only think use split to get the array@, the [0],[1],[2], then restructure the sequence. Is there a simple line to do that? ![]() Thanks -----Post Update----- @file_e_tmp = split('-', $ARGV[0]); $file_date_e = $file_e_tmp[2].$file_e_tmp[1]."20".$file_e_tmp[0]; |
| Bits Awarded / Charged to durden_tyler for this Post | |||
| Date | User | Comment | Amount |
| 06-17-2009 | jimmy_y | Thanks | 200 |
|
||||
|
Hi Frank, not sure how to run this command. please advice
i run "awk -F- '{print $3 $2 "20" $1} 09-06-11"? "awk -09-06-11- '{print $3 $2 "20" $1}"? Thanks |
|
|||||
|
Quote:
Code:
echo "09-06-11"|awk -F- '{print $3 $2 "20" $1}'
Code:
echo "09-06-11"|sed 's/\(.*\)-\(.*\)-\(.*\)/\3\220\1/g' |
| Bits Awarded / Charged to vidyadhar85 for this Post | |||
| Date | User | Comment | Amount |
| 06-17-2009 | jimmy_y | N/A | 200 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|