Skip to content

Instantly share code, notes, and snippets.

@cjjavellana
Last active August 29, 2015 14:15
Show Gist options
  • Save cjjavellana/85e8324afc392c8fa90f to your computer and use it in GitHub Desktop.
Save cjjavellana/85e8324afc392c8fa90f to your computer and use it in GitHub Desktop.
Shell Shortcuts
# Finding a file in a zip file
for file in `ls -ltr *.zip | awk '{print $9}'`; do echo "Unzipping $file"; unzip -l $file | grep rm_batch; done;
# Sample output
Unzipping rm_logs_20150221020001.zip
41526 02-21-15 00:55 standalone/rm/logs/rm_batch_20150220.log
Unzipping rm_logs_20150221000000.zip
7353 02-20-15 21:04 standalone/rm/logs/rm_batch_SPMM_20150220.log
37686 02-20-15 22:48 standalone/rm/logs/rm_batch_20150220.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment