file modification

regex

Cheatsheet

.* : match everything.
(\s){2,}: 2 or more spaces

sed

sed -i '/<SEARCH>/<REPLACE>/g' file
# -i: make changes in file
# -e: show output in terminal
# SEARCH: escape using '\'
# REPLACE: no escape

cut

# using cut
cut -d DELIMITER -f FIELD

# to remove first string from text
cut -c2-

awk

# TODO

Last updated