Ptouch

From Cheatsheet
Revision as of 15:21, 23 May 2011 by 69.16.222.26 (talk) (Created page with ' #!/bin/bash #**************************# # Name: ptouch # # Version: 1.0 # # Author: Kevin M. Johsnon # #**************************# #-------------#…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


#!/bin/bash
  1. Name: ptouch #
  2. Version: 1.0 #
  3. Author: Kevin M. Johsnon #
  1. -------------#--------------------------------------------#
  2. Change Log | |
  3. -------------#--------------------------------------------#
  4. Date # Change Description |
  5. -------------#--------------------------------------------#
  6. 2011-05-21 | Original utility creation. |
  7. -------------#--------------------------------------------#

if [ -e $1 ] then

  echo "The file $1 already exists. Launching vim." ;
  sleep 2;
  vim $1;
  exit;

fi

perl=`which perl`;

echo "#!$perl" > $1; chmod u+x $1; vim $1;