bashoneliners.com

Welcome to bashoneliners.com, a curated collection of practical and well-explained Bash one-liners, snippets, tips and tricks. We aim to make each published one-liner to be of high quality: useful, easy to read, follows best practices, with clear, detailed, accurate explanation. These one-liners should help you automate tasks, troubleshoot problems, whether it be in system administration, file management, networking or programming.

Create fattal tone mapped images from a directory of raw images

for img in /path/to/rawimages/*.RW2; do pfsin ${img} | pfssize -x 1024 -y 768 | pfstmo_fattal02 -v -s 1 | pfsout /path/to/finished/${img%%}.jpg; done

June 3, 2013mmaki

Create a thumbnail from the first page of a PDF file

convert -thumbnail x80 file.pdf[0] thumb.png

February 6, 2013bashoneliners

Remove EXIF data such as orientation from images

mogrify -strip /path/to/image.jpg

October 24, 2012bashoneliners