This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Awk | |
awk 'BEGIN {print "<"} {print $1 "/" $NF } END {print ">"}' # print 1st field + total fields per line | |
awk '{print $1, $2}' | awk '{print $1 $2}' # concat separated vs. concat | |
awk '{ if ($0 ~ /regex/) { print $0 } }' # prints lines matching regex | |
awk 'BEGIN {FS=","}' # use comma as field separator | |
# Variables | |
# OFS - Output Field Separator | |
# NR - Number of Records (lines) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Easier navigation: .., ..., ...., ....., ~ and - | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias ~="cd ~" # `cd` is probably faster to type though | |
alias -- -="cd -" | |
alias aws="aws --region us-east-1" | |
bind '"\et':\""tail -f\"" |