SCRIPT:
#!/bin/bash
echo -n "enter any value : "
read val
if [[ -n $val ]]
then
echo "input entered"
else
echo "not entered"
fi
OUTPUT:
i)run -> ./enter.sh
enter any value :
not entered
not entered
ii)run -> ./enter.sh
enter any value : hi
input entered
input entered
No comments:
Post a Comment