![]() |
|
|
|
|
|||||||
| 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 |
| shell variables and sed substitution | duderonomy | UNIX for Advanced & Expert Users | 2 | 05-04-2008 11:54 PM |
| how to pass variables surrounded in double quotes to awk? | cruiser | AIX | 4 | 03-24-2006 01:12 PM |
| double variable substitution | asal_email2 | UNIX for Dummies Questions & Answers | 1 | 06-13-2005 09:35 PM |
| ksh substitution | solea | Shell Programming and Scripting | 2 | 08-09-2004 02:30 AM |
| substitution | supercbw | Shell Programming and Scripting | 1 | 06-07-2002 12:07 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Double Substitution variables in ksh
Hi
I have a variable whose value is like this i=/test/test1/test2/myfile.cd.070505123457 i would like to have the value of myfile.cd stored into another variable my attempt is test=${i##*/} ;echo $test ##and i get myfile.cd.070505123457 since what i wnat is myfile.cd i try this test={{${i##*/}}##.} ;echo $test and i get an error Any idea how do i get what i want ? regards xiamin |
| Forum Sponsor | ||
|
|
| Tags |
| regex, regular expressions |
| Thread Tools | |
| Display Modes | |
|
|