xargs, ls, and sort

Needed to download multiple files and join them together

$ for count in {0..100};do echo $count; done | xargs -n 1 -I '{}' -P 10 curl -O 'http://someshite/updates/1.1/pke{}.bin'

$ ls -1 | sort -n -k1.4 | xargs -n 1 -I '{}'  cat '{}' > fw.bin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s