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.

Generate a sequence of numbers using Brace Expansion

for i in {1..10}; do echo "$i"; done

October 25, 2019diego

Generate a sequence of numbers, one number per line

perl -e 'print "$_\n" for (1..10)'

May 30, 2017abhinickz6

Generate a sequence of numbers, zero-padded

echo {01..10}

March 1, 2015Elkku

Create a sequence of integer numbers

echo {4..-9}

November 24, 2011bashoneliners