Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- echo "Podaj nazwę"
- read name
- echo "Podaj typ (bash/sh)"
- read type
- if [ -e ./$name ]
- then
- echo "Już masz taki skrypt"
- exit
- else
- touch $name
- chmod 755 $name
- case $type in
- "bash") echo '#!/bin/bash' > $name ;;
- "sh") echo '#!/bin/bash' > $name ;;
- *) echo "Nie wiem co to za typ" ;;
- fi
- esac
- vim $name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement