Random Bash Stuff
Notes
-
A more in-depth diff is
vimdiff
. -
To run a command from inside Vim, use
:!<command>
. To refer to the file being currently edited, use%
. e.g.,:!bash %
runs the current file as a bash script.
Useful Unix One-liners
-
Print all instances of different commands used (from history, sorted)
history | awk '{$1=""; sub(/^ /, ""); print}' | sort -u
-
Check the difference of two cut files
diff -s <(cut <options> file1) <(cut <options> file2)