macOS command-line tools you might not know about
Great list, working with Mac a long time and found some good things here. This might be useful too:# cd to frontmost open finder folder (in Terminal cd to the current top finder window)
cdf() { cd "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"; pwd; }# Copy the frontmost open finder folder Path from Terminal to the Clipboard in MacOS: 
cpf() { echo "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"|pbcopy; }# open manpage in preview app: 
pman() { mandoc -T pdf "$(/usr/bin/man -w $@)" | open -fa Preview; }# Function to delete a given line in ssh known_hosts file:
xho() { line=$1;tFile="$HOME/.ssh/known_hosts";sed -e "${line}d" -i ".tmp" "$tFile";}