Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 39 lines (36 sloc) 558 Bytes
#!/bin/bash
function usage() {
if [ "$1" == "" ]; then
echo "usage: $0 braucht Skriptnamen"
return 1
fi
return 0
}
p=`which bash`
usage $1
if [ $? = 1 ]; then
echo "Skryptname eingeben: "
read file
file="${file}.sh"
else
file="${1}.sh"
fi
x="false"
while [ "$x" = "false" ]
do
if [ ! -e ${file} ]; then
x="true"
else
echo "existiert bereits !!!!"
echo "neuen Skryptname eingeben: "
read file
file="${file}.sh"
fi
done
exec 3> /dev/null
touch ./${file} >&3
chmod a+x ${file} >&3
echo "#!${p}" >> ${file}
geany ${file} &
exec 3>&-
exit 0