I am trying to pass two strings to a while loop but i forgot the syntax please help me out. This is what i am trying-
#!/bin/bash
while read line
do
echo "successful"
done < "var1" "var2"
exit
I know i am doing something wrong here, i used to pass strings to while loop but i forgot the syntax. Please help me out here.
I am aware of -
#!/bin/bash
while read line
do
echo "successful"
done < "file_containing_var1_and_var2"
but i want to pass strings and not file to while loop, Any help is appreciated.