I'm running a loop on each line in a file.
if [ -e "/tmp/history" ]; then
while read line; do
connect.sh $line \
&& break
done </tmp/history
fi
The file is formatted like:
user\ name user\ password
So that each line will contain $1
and $2
for connect.sh
.
Yet it seems with my while loop $line
loses the line breaks before passing to connect.sh
so that user\ name
becomes user name
.
Is there a way I can modify my while loop to maintain the line breaks?