hi group ....
I am reading from one end of a FIFO & there are commands coming out of the FIFO which looks something like this :::
CWD /ftproots/students/tom.gary/homepage
CWD /ftproots/staff/sam.pinto/welcome
CWD /ftproots/students/dan.maclean/myfolder/webaccount
CWD /ftproots/alumini/tony.washinton/home
& i want to convert this into :
cd /homepage
cd /welcome
cd /myfolder/webaccount
cd /home
in other words i want to get rid of the 3 degree of the URL depth, ie /... / ... / ... / (i want this level only)
i have a fifo handle $read and i am trying something like this:
$path = sed 's/CWD\/.*.\//cd \//' $read;
but it doesnt work.
can any one help me in doing this ...
thanks in advance ...