Skip to content
Advertisement

How to call variables from ip.txt file to .sh file?

I have list of ip addresses in one txt file which I have named ip.txt

I want to call those ip in my .sh file, I am not sure how to proceed here..

here I did soemthing

JavaScript

Please tell me how to do that?

Advertisement

Answer

This should make it:

JavaScript

or using for as you do

JavaScript

because the syntax is: for i in $(<file); do echo $i; done

Advertisement