We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- Comparing Numbers
- Discussions
Comparing Numbers
Comparing Numbers
Sort by
recency
|
244 Discussions
|
Please Login in order to post a comment
Simple Bash Code !
`
the post sets up a clear task for comparing integers and provides a structured format for input and output. Fairbet7
read num1 read num2
Compare the numbers
if [ num2 ]; then echo "X is greater than Y" elif [ num2 ]; then echo "X is equal to Y" else echo "X is less than Y" fi