Bash loops

From Tech-Wiki
Revision as of 20:24, 13 February 2017 by Fabricio.Lima (Talk | contribs) (Created page with "Category:Linux Executing a Do loop to repeat one command with different hosts for n in {1..5}; do ssh host0$n "shutdown"; done Executing the same command forever while...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Executing a Do loop to repeat one command with different hosts

for n in {1..5}; do ssh host0$n "shutdown"; done

Executing the same command forever

while true; do date +%s; done