Advertisement
Guest User

Untitled

a guest
Aug 14th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # @author  Thiago Jose Lucas
  4. # @since   18-02-2013
  5. # @version v1.0
  6.  
  7. read -p "Entre com a string: " STRING
  8. CHARS=$(echo $STRING|wc -c)
  9. CHARS_DIV=$(($CHARS/2))
  10. let CHARS--
  11.  
  12. seq 1 $CHARS_DIV | while read POSITION ;do
  13.    printf "$(echo $STRING | cut -c$POSITION)"
  14.    printf "$(echo $STRING | cut -c$(($POSITION+$CHARS_DIV)))"
  15. done
  16.  
  17. echo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement