ACM@UIUC TIL logo ACM@UIUC TIL

This is a collection of snipits of common tasks

Remove everything before the last space

awk {'print $NF'}

Remove a substring from the end of each line in a file

awk '{gsub(/{SUB_STRING]$/,""); print}' file.txt