Hello, I am new to scripting and need some help. In looking at other posts on this forum, I came up with the following logic. I cannot figure out why I am getting names of files of the current directory in my echo output.
Scenario: message file has a line containing the version. Version.txt contains the correct version. I have to see if the message file's version matches the correct version.
Can you tell me what I am doing wrong??
cat /home/brdholman/testing/Tar/Message.dat | while read LINE
do
#if [[ "$LINE" = "$Version.txt" ]]
VERSION="$LINE"
cat Version.txt | while read LINE2
do
if [[ "$LINE2" = "$VERSION" ]]
then
echo $VERSION
else
continue
#echo not equal
fi
done
done