Suva Programming
Blog about C++ and other programming source code.
Pages
Home
Privacy Policy
Disclaimer
Thursday 12 November 2020
Shell Programming to check odd and even numbers
Program :-
echo "Enter a number : "
read n
if["expr $n%2" -0]
then
echo "Even number"
else
echo "Odd number"
fl
Shell Programming 1
Program :-
echo "1 - who am i ?"
echo "2 - who is logged on ?"
echo "3 - date"
echo "4 - calendar"
echo "Enter your choice: "
read n
case $n in
1) who am i ;;
2) who ;;
3) date ;;
4) cal ;;
esac
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)