Hmm, I see. The awk script will remove characters upto (and including) a certain string but also all instances of a certain string. So I guess you want...
awk -v s="a certain string" '
f==1;
f==0{
if(b=index($0,s)){
sub(s,""
if(c=substr($0,b))
print c;
f=1
}
}' X > Y
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.