Hi ,
i am stuck in this simple script.
#!/bin/ksh
echo "enter the file name"
read flname
echo "enter version"
read ver
grep $flname /home/con/snsc/perl/map > flplist
dirname `cat flplist` | sed 's/\/so${vers}\//\/so${vers}_xyz\//' > dirlist
the map file is basically a list of file with full path.
my grep will result a flplist
which looks like this
/home/con/snsc/perl/templates/so211/ajax/123.txt
my results should look like
/home/con/snsc/perl/templates/so211_xyz/ajax/
but this script will give a out put similar to the path in flplist
please help in this.
if you need more details please tell me.