tags:

views:

57

answers:

3

I have a lines:

something ..fdfad ABCD info
fdsafsda fae faefdsa fABCD info23

I want get line after ABCD

+1  A: 
$ sed 's/.*ABCD //' file
info
info23
ghostdog74
A: 

You can use awk for this

awk '{printf "%s\n", $NF}' FS="ABCD" myfile
Gopi
+1  A: 

Let your shell handle it:

line="something ..fdfad ABCD info"
printf "result:%s\n" "${line##*ABCD }"
glenn jackman