3 ms·
Or in PowerShell on Windows: 1..1119 | % { iwr "https://codex-atlanticus.ambrosiana.it/assets/2000/000R-$_.jpg" -OutFile "000R-$_.jpg" } 1..1119 | % { iwr
by WithinReason 11mo ago
Or in PowerShell on Windows:
1..1119 | % { iwr "https://codex-atlanticus.ambrosiana.it/assets/2000/000R-$_.jpg" -OutFile "000R-$_.jpg" }
1..1119 | % { iwr "https://codex-atlanticus.ambrosiana.it/assets/2000/000V-$_.jpg" -OutFile "000V-$_.jpg" }
- embedding-shape 11mo agoSome people around me swear PowerShell has better user experience than unix shells, but then I keep seeing examples like these. How on earth could people prefer this compared to `wget https://codex-atlanticus.ambrosiana.it/assets/2000/000V-{1..1119}.jpg https://codex-atlanticus.ambrosiana.it/assets/2000/000V-{1.....`?
- kragen 11mo agoIn this case presumably the main difference is not PowerShell vs. bash but iwr vs. wget? Because I think this is roughly equally bad (untested): for page in {1..1119}; do iwr "https://codex-atlanticus.ambrosiana.it/assets/2000/000R-$page.jpg" -OutFile "000R-$page.jpg" iwr "https://codex-atlanticus.ambrosiana.it/assets/2000/000V-$page.jpg" -OutFile "000V-$page.jpg" done Also until recently bash didn't have {42..53} syntax. You had to use `seq`. There was an alternative name for `seq` in Unix Power Tools, `jot`, because it wasn't standard: https://docstore.mik.ua/orelly/unix/upt/ch45_11.htm https://docstore.mik.ua/orelly/unix/upt/ch45_11.htm. This section was by ORA author and sysadmin Linda Mui (https://www.oreilly.com/pub/au/268 https://www.oreilly.com/pub/au/268), but I don't know if she wrote `jot` or just popularized it.