Quantcast
Channel: Script to convert many binary files to ASCII - Ask Ubuntu
Browsing latest articles
Browse All 2 View Live

Answer by steeldriver for Script to convert many binary files to ASCII

Simple for loop: for f in ./*.gz; do convert.py "$f" > "${f%.gz}.txt" done Using the find command: find . -maxdepth 1 -name '*.gz' -exec sh -c 'convert.py "$1" > "${1%.gz}.txt"' sh {} \; or find...

View Article



Script to convert many binary files to ASCII

I'd like to run a script, say convert.py (which converts binary to ascii, but outputs to stdout) on 30 or so *.gz files, but instead of output going to screen, it goes to a *.txt file, similar to so:...

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images