I want to extract a string from the variable value which is
Newpath="/home/user1/Projects/newone"
I just want to extract '/home/user1/Projects' from the above variable. I have used the following command
proj_dir=`echo $Newpath | sed 's,^.*//$,\1,'`
But sed garbled.
Thanks for the help