Skip to content

Instantly share code, notes, and snippets.

@markmur
Created September 10, 2018 14:42
Show Gist options
  • Save markmur/b3b649ff14f0026a5022bcd17acee0cf to your computer and use it in GitHub Desktop.
Save markmur/b3b649ff14f0026a5022bcd17acee0cf to your computer and use it in GitHub Desktop.
Handy Terminal Commands
# 'cat' after first line
cat {filename} | tail -n+2
# (CSV) Get every value of first column (separated by comma)
cat {filename} | awk -F',' '{printf $1","}'
# (CSV) Get every value of first column (one per line)
cat {filename} | awk -F',' '{print $1}'
# Only print first x lines (4 in this case)
head -n4 {filename}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment