#!/bin/bash
#Author:
#Date:
#Name:
#Usage:
#Purpose:
I have prepared a shell-script to automatically add the above header to the newly created shell-script. Just go through it and let me know if you happen to come across any bug in it:
#!/bin/bash
#Author: Parag Kalra
#Date: 30th May, 2008
#Name: shell-script-header.sh
#Usage: ./shell-script-header.sh
#Purpose: To add headers to shell-scripts
echo "Enter the date: "
read SHDATE
echo "Enter the name of the shell script: "
read SHNAME
echo "Enter the purpose of this shell script: "
read SHPURPOSE
export SHDATE #='$SHDATE'
export SHNAME #='$SHNAME'
export SHPURPOSE #='$SHPURPOSE'
touch $SHNAME
echo "#!/bin/bash" >> $SHNAME
echo "#Author: Parag Kalra" >> $SHNAME
echo "#Date: $SHDATE" >> $SHNAME
echo "#Name: $SHNAME" >> $SHNAME
echo "#Usage: ./$SHNAME" >> $SHNAME
echo "#Purpose: $SHPURPOSE" >> $SHNAME
#END OF SCRIPT

1 comment:
Nice!!, Pretty Innovative to start with..
Post a Comment