Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- text=""
- params=$#
- if ((params == 0))
- then
- read text
- else
- if [ "$1" == "-help" ]
- then
- echo "Manual"
- echo "******"
- echo "A program a bemenetekent megkapott szoveget fuggolegesen kiirja a kepernyore"
- echo "Hasznalat: Ha nem adunk meg parametert, akkor szurokent viselkedik pl.: echo egyiptomi ugroeger | ./bash. Ha parameterek formajaban felsorolunk fajlokat, akkor azoknak a tartalmat irja ki az elobb emlitett modon. pl.: ./bash | sisakos kazuar."
- else
- for arg in $*
- do
- while read line
- do
- text="$text$line"
- done < $arg
- done
- fi
- fi
- n=${#text}
- for ((i=0; i<n; i++))
- do
- echo "${text:$i:1}"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement