Using the shell "Remove Large Left Pattern"
The initial assignment
dirF=/dirA/dirB/dirC/dirD/dirF
could be modified using:
echo "./${dirF##*/}"
The output would be:
../dirF
This should work with ksh, dtksh, and bash.
<rickm [at] galaxy.nsc.com> wrote in message
news:92d0c268-1611-4db8-90c7-fa64e969313f [at] e25g2000prg.google groups.com...
>I need to modify a path sttring thats in a file and looks like this:
>
> before :
>
> define dirF /dirA/dirB/dirC/dirD/dirF
>
> after
>
> define dirF ./dirF
>
> basically, remove all of the path string except for the last portion
>
> Thanks
>
> RIck
