Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function scramble(){
- local s=$* i
- while((${#s})); do
- ((i=RANDOM%${#s}))
- echo -n "${s:i:1}"
- s=${s::i}${s:i+1}
- done
- }
- scramble This is a test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement