↧
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 ArticleScript 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