Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [[ $# -gt 0 ]]; then
- size=${#1}
- for (( i = 0; i < $size; i++ )); do
- index=$(($size-$i))
- result+=${1:$(($index-1)):1}
- done
- fi
- echo $result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement