View Single Post
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#2
Your script is:
Code:
#!/bin/sh
echo "Thanks for using this script. Copyright 2011 Pang Zi Yang"
echo "This script enables you to change .sh scripts into commands for easy usage"
find /home/user/MyDocs/ -name \*.sh
echo "Please enter name of the script you want to convert into command"
echo "Don't need to enter /home/user/MyDocs/"
read scriptlocation
echo "Please enter the name of the command"
read commandname
chmod a+x /home/user/MyDocs/$scriptlocation | echo "Please hold on"
cp /home/user/MyDocs/$scriptlocation /usr/bin/$commandname | echo "Done"
# cmdmaker.sh
# 
#
# Created by Pang Zi Yang on 1/19/11.
# Copyright 2011 Pang. All rights reserved.
Well, the Copyright note is funny. You are reserving your rights on copying a file from a directory to another and changing the permissions, aren't you?
__________________
Ernesto de Bernardis

 

The Following 2 Users Say Thank You to debernardis For This Useful Post: