Skip to content

Commit

Permalink
Create crP
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Nov 24, 2015
1 parent 7fed4b7 commit 957c13d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions crP
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

function usage() {

if [ "$1" == "" ]; then
echo "usage: $0 braucht Skriptnamen"
return 1
fi
return 0
}
usage $1
if [ $? = 1 ]; then
echo "Skryptname eingeben: "
read file
else
file="${1}.pl"
fi
x="false"
while [ "$x" = "false" ]
do
echo $file
if [ ! -e ${file} ]; then
echo "!!!"
x="true"
else
echo "existiert bereits !!!!"
echo "neuen Skryptname eingeben: "
read file
file="${file}.pl"
fi
done

exec 3> /dev/null
touch ./${file} >&3
chmod a+x ./${file} >&3
echo '#!/bin/perl -w' >> ${file}
echo ' ' >> ${file}
echo 'use strict;' >> ${file}
echo 'use warnings;' >> ${file}
echo ' ' >> ${file}
geany ${file} &
exec 3>$-
exit 0

0 comments on commit 957c13d

Please sign in to comment.