Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function expressionsWithoutIf {
- A=$1
- B=$2
- [ "$A" -ge "$B" ] ; C=$?
- if [ "$C" == "0" ]; then
- echo "TRUE!"
- else
- echo "FALSE!"
- fi
- C=$((A > B))
- if [ "$C" == "1" ]; then
- echo "TRUE!"
- else
- echo "FALSE!"
- fi
- if [ "$A" -ge "$B" ]; then
- echo "TRUE!"
- else
- echo "FALSE!"
- fi
- }
- expressionsWithoutIf 70 40
- expressionsWithoutIf 70 90
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement