Hi everybody, I am new to shell script. Please help me with this problem.
I have a file test.txt with the content like this:
! ((x5 * -1/3000) = x6)
((x5 * -1/2000) = x6)
I have a shell script test.sh like this
#!/bin/sh
while read line
do
echo $line >> out.txt
done < test.txt
out.txt is expected to have the same content with test.txt. But here is the output.txt
! ((x5 laconfirm remote1 test.sh test.txt -1/3000) = x6)
((x5 laconfirm out.txt remote1 test.sh test.txt -1/2000) = x6)
laconfirm remote1 test.sh test.txt are files in the same folder.
It replaces the * in the original text.txt
Would you please tell me what is my problem and how I can fix it?
Thanks in advance.