hi,
I have a string "satabeltodounixscriptingpleasecheckfortheerros"
in the above line if it contains "unix" , i need to take 5 characters after that word.
please help
thanks in advance
Satya
hi,
I have a string "satabeltodounixscriptingpleasecheckfortheerros"
in the above line if it contains "unix" , i need to take 5 characters after that word.
please help
thanks in advance
Satya
$ echo "satabeltodounixscriptingpleasecheckfortheerros" |sed 's/.*unix//g'|awk '{print substr($0,1,6)}'
script
Thanks
Sha
no need for that extra awk process
echo "satabeltodounixscriptingpleasecheckfortheerros" |sed 's/.*unix\(.....\).*/\1/'