Linux Mastering Development

i need to output all words matching in unix file

When i have this set of data in a unix text file named raw.txt

2020-05-28 08:00:32,360 | push_imgs | INFO | Pulled 950-09050294592-FACE.jpg
2020-05-28 08:00:32,373 | push_imgs | INFO | Pulled 950-09050294592-SIGNATURE.jpg

I only need to print the Date and the .jpg file. like the sample below

2020-05-28 950-09050294592-FACE.jpg

I currently have below script which will just get all lines with pulled and .jpg. i only need to print date and the .jpg file.

awk '/Pulled/&&/.jpg/' IGNORECASE=1 /home/user/rawfile.txt 

Thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *