LoslegenKostenlos loslegen

Downloading multiple files using curl

We have 100 data files stored in long sequentially named URLs. Scroll right to see the complete URLs.

https://s3.amazonaws.com/assets.datacamp.com/production/repositories/4180/datasets/files/datafile001.txt
https://s3.amazonaws.com/assets.datacamp.com/production/repositories/4180/datasets/files/datafile002.txt
......
https://s3.amazonaws.com/assets.datacamp.com/production/repositories/4180/datasets/files/datafile100.txt

To minimize having to type the long URLs over and over again, we'd like to download all of these files using a single curl command.

Diese Übung ist Teil des Kurses

Data Processing in Shell

Kurs anzeigen

Anleitung zur Übung

  • Download all 100 data files using a single curl command.
  • Print all downloaded files to directory.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Download all 100 data files
curl ___ https://s3.amazonaws.com/assets.datacamp.com/production/repositories/4180/datasets/files/datafile___.txt

# Print all downloaded files to directory
ls datafile*.txt
Code bearbeiten und ausführen