this is some data this is other data this is new data #### perl -ne'/(data)/ && print $1' file.txt