Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Do cmd X times without a forloop

From John's Wiki
Revision as of 01:09, 30 April 2024 by Admin (talk | contribs) (Created page with "Say you're in a weird shell and you don't know how to do a forloop. No worries! You can use seq | xargs to run some command any number of times. seq 5 | xargs -I {} echo fart")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Say you're in a weird shell and you don't know how to do a forloop. No worries! You can use seq | xargs to run some command any number of times.

seq 5 | xargs -I {} echo fart