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.

Cut select pages from a pdf file and create a new file from those pages.

ps2pdf -dFirstPage=3 -dLastPage=10 input.pdf output.pdf

February 15, 2012Anon6y5E4Use

Cut select pages from a pdf file and create a new file from those pages.

 pdftk input.pdf cat 2-4 7 9-10 output output.pdf

February 3, 2012mmaki

Use ghostscript to shrink PDF files

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

January 31, 2012openiduser10