12
11

More than 5 years have passed since last update.

xargsで処理の間にsleepを挟む

Last updated at Posted at 2014-11-12

上は駄目で下ならできる、シェル難しい。

$ cat hoge | xargs -I 'echo {}; sleep 1;'
$ cat hoge | xargs -I % sh -c '{ echo %; sleep 1; }'
12
11
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11