Below is my shell script. How to compare the exit status of function in while loop condition block ? Whatever I return from check1
function my code enters into while loop
#!/bin/sh
check1()
{
return 1
}
while [ check1 ]
do
echo $?
check1
if [ $? -eq 0 ]; then
echo "Called"
else
echo "DD"
fi
sleep 5
done