What is file globbing?

Globbing is the * and ? and some other pattern matchers you may be familiar with. Globbing interprets the standard wild card characters * and ?, character lists in square brackets, and certain other special characters (such as ^ for negating the sense of a match). When the shell sees a glob, it will perform … Read more

How to expand shell variables in a text file?

This question has been asked in another thread, and this is the best answer IMO: export LOG_FILE_PATH=/expanded/path/of/the/log/file/../logfile.log cat Text_File.msh | envsubst > Text_File_expanded.msh if on Mac, install gettext first: brew install gettext see: Forcing bash to expand variables in a string loaded from a file

How to display only different rows using diff (bash)

a.txt: 1;john;125;3 1;tom;56;2 2;jack;10;5 b.txt: 1;john;125;3 1;tom;58;2 2;jack;10;5 Use comm: comm -13 a.txt b.txt 1;tom;58;2 The command line options to comm are pretty straight-forward: -1 suppress column 1 (lines unique to FILE1) -2 suppress column 2 (lines unique to FILE2) -3 suppress column 3 (lines that appear in both files)