Another modification of a variable
name=/data/cur/00000.chd.hgt
now i need to remove /data/cur and want the vairable as name=0000.chd.hgt i tried cut but it didnt work for me. can anyone let me know how to do it? thanks |
This is a task for the basename command:
Code:
name=$(basename $name) Code:
name=${name##*/} |
Thanks . it is working.
|
All times are GMT -5. The time now is 12:47 AM. |