H
H
hackuun2018-07-14 15:48:24
linux
hackuun, 2018-07-14 15:48:24

How to make different wget numbering?

I download several files with the same name and wget numbers them like this

giphy.mp4.10
giphy.mp4.11
giphy.mp4.12
giphy.mp4.13

How to add a number before the extension?
Or the second option - how to generate a random name?
I download using the file in which the links
wget -i cats.txt

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mysterion, 2018-07-14
@Mysterion

#!/bin/bash
cat $1 | while read line
do
  $(`which wget`) $line -O custom_file.mp4
done

Well, in the code you can set arbitrary file names, whatever you want.
./script.sh cats.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question