<keywords content="bash,script"/>
#!/bin/bash eval "B=`cat $1 |egrep \"<$2>.*</$2>\"| sed 's%\s*<'$2'>\(.*\)</'$2'>%\1%'`" echo $B
#!/bin/bash MYPATH="/appli/PROJ/PROJECT1" SUBSTRING=$(echo $MYPATH |grep PROJ |sed 's/.*\(PROJ.*\)$/\1/') echo $SUBSTRING
=> PROJ/PROJECT1
sed -e '1,10d' -i file