0

When I use curl -s to access a text file, it will display the entire content. Is there any way to ignore the first line of content?

Test text file link:

curl -s https://raw.githubusercontent.com/Automattic/_s/master/languages/readme.txt
Matthew
  • 351
  • 2
  • 14

1 Answers1

1

You can pipe and use another command to remove the first line, for example using tail

curl -s https://... | tail +2

or sed

curl -s https://... | sed '1d'
sebasth
  • 14,332
  • 4
  • 50
  • 68
  • thank for your reply! If access multiple files at the same time, can delete the first line of each file? `curl -s https://... https://...` – Matthew Sep 30 '19 at 03:26
  • Likely the easiest way is to run `curl` once per url, eg. `curl -s https://...| tail +2; curl -s https://... | tail +2; ...` – sebasth Sep 30 '19 at 11:26