![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| echo $0 | mainegate | Shell Programming and Scripting | 2 | 09-23-2007 10:34 PM |
| echo | debasis.mishra | Shell Programming and Scripting | 0 | 03-27-2006 09:35 PM |
| How to set echo on | siegfried | Shell Programming and Scripting | 1 | 11-17-2005 09:56 PM |
| echo ????? | nguda | UNIX for Dummies Questions & Answers | 1 | 06-30-2003 01:02 PM |
| echo help | bb00y | High Level Programming | 5 | 10-02-2002 05:53 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
echo ${PWD#${PWD%/*/*}/}
Can anyone explain this in detail ...
echo ${PWD#${PWD%/*/*}/} [PWD is the present working directory] Thanks in Advance |
| Forum Sponsor | ||
|
|
|
||||
|
Have a look at:
Bash Reference Manual and here, Code:
echo ${PWD#${PWD%/*/*}/}
is
echo ${PWD#X/}
where X = ${PWD%/*/*}
i.e it's a split in a split....
|
||||
| Google UNIX.COM |
| Tags |
| bash, echo, variable expansion |
| Thread Tools | |
| Display Modes | |
|
|