Bash single-line Commands

for loop:

$ for i in {1..10}; do ping 192.168.1.$i; done

 

if-else:

$ if foo; then bar; else fubar; fi