How to Print from matching word to end using awk

Team,

Could some one help me in Printing from matching word to end using awk

For ex:

Input:

I am tester for now
I am tester yesterday
I am tester tomorrow

O/p

tester for now
tester yesterday
tester tomorrow

i.e Starting from tester till end of sentence

Please help

Why not man cut ("cut") ?

cut -d\  -f3- file

what have you tried so far? Please post code so we can assist.

As of now i was planning to use awk .. havent tried any code..planning to use awk

---------- Post updated at 08:44 PM ---------- Previous update was at 08:43 PM ----------

cut -d\ -f3- file

i cant saw it as f3 ...as it may be at any position

I strongly suggest learning basic awk. There are plenty of resources and examples online. Please give it a try so you can be self sufficient over the long term. Based on your question it looks like you just want someone to write the script for you.

This is just my personal opinion but I think people should make a reasonable attempt at the script before posting a question about it.

ruby -ne 'puts $1 if $_=~/.*(tester.*)$/' file