Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Print decremental numbers based on user input
- #n...8 7 6 5 4 3 2 1
- echo "Input number"
- read k
- while test $k != 0
- do
- echo "$k"
- k="$(( k - 1 ))"
- done
- [root@localhost standalone_scripts]# . ./decr.sh
- Input number
- 5
- 5
- 4
- 3
- 2
- 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement