Created
May 26, 2015 12:09
-
-
Save rhaist/83cf2d8090620b867c87 to your computer and use it in GitHub Desktop.
Bash on-liner to generate ASCII and WIDE strings from a file and show a sorted output
This file contains 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
#!/bin/bash | |
(strings -a -td "$@" | sed 's/^\(\s*[0-9][0-9]*\) \(.*\)$/\1 A \2/' ; strings -a -td -el "$@" | sed 's/^\(\s*[0-9][0-9]*\) \(.*\)$/\1 W \2/') | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On OS X: use
gstrings
andgsed
port install binutils
port install gsed