#!/bin/bash
# Reading
cat /home/radiare/Desktop/first.txt | while read LINE
do
if [ "$LINE" == "false" ]; then
echo "Inside first loop"
break
fi
done
cat /home/radiare/Desktop/second.txt | while read LINE
do
if [ "$LINE" == "false" ]; then
echo "Inside second loop"
break
fi
done
In ubuntu client, I could able to execute this script and echo inside if statements are properly working. I did the same thing in ubuntu server it is not going inside the if statement. only difference is I run using sudo on the server.
Any suggestions?
echo
rather thancat
? (Assuming that the script is exactly the same on both machines.)$LINE
before eachif
statement and see what's going on. (Also I have no idea what you mean by "ubuntu client" - do you mean Ubuntu Desktop Edition as opposed Server or Cloud editions?)