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

seq 1 10

January 17, 2020penkoad

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

Generate a sequence of numbers using a simple for loop

for ((i=1; i<=10; ++i)); do echo $i; done

November 4, 2014bashoneliners