K
K
koliq2021-10-03 20:04:35
linux
koliq, 2021-10-03 20:04:35

How to get links from a text file?

I have a text file where each new line contains one link. How can I get each link one by one using a shell script and execute the command I need with it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xibir, 2021-10-03
@koliq

for a in `cat links.txt`; do
   echo $a
done

S
Saboteur, 2021-10-04
@saboteur_kiev

while read; do
  echo $REPLY
done<links.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question