Skip to content

Instantly share code, notes, and snippets.

@jestan
Last active August 29, 2015 14:26
Show Gist options
  • Save jestan/253f617aae2edf542b9a to your computer and use it in GitHub Desktop.
Save jestan/253f617aae2edf542b9a to your computer and use it in GitHub Desktop.
Command Line Kung Fu
1. Count unique lines in a file
cat <file-path> | sort | uniq | wc -l
2. Append Given Characters in each line of the file
sed 's/$/<data>/' input.txt > output.txt
3. Find corrupted jar files in local maven repostiory
find ~/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment