Shell

Process Every File in Directory

find /some/directory -maxdepth 1 -type f -exec cmd option {} \; > results.out

Find File by Content

find . -type f -name "*.java" -print | xargs grep "window"

Display Specific Column from Text

cat * | awk '{print $2}'

List all open ports for one process

netstat -anp46 | grep LISTEN | grep <processid>

Redirect stderr and stdout

test.sh &> /tmp/log