The Following 3 Users Say Thank You to pang For This Useful Post: | ||
|
2011-01-23
, 07:32
|
|
Posts: 2,142 |
Thanked: 2,054 times |
Joined on Dec 2006
@ Sicily
|
#2
|
#!/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.
The Following 2 Users Say Thank You to debernardis For This Useful Post: | ||
|
2011-01-23
, 08:36
|
Posts: 671 |
Thanked: 1,630 times |
Joined on Aug 2010
|
#3
|
Your script is: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?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.
|
2011-01-23
, 13:14
|
Posts: 24 |
Thanked: 9 times |
Joined on Nov 2010
@ Penang/Malaysia
|
#4
|
The Following User Says Thank You to pang For This Useful Post: | ||
|
2011-01-23
, 16:41
|
|
Posts: 1,030 |
Thanked: 792 times |
Joined on Jun 2009
|
#5
|
The Following User Says Thank You to hawaii For This Useful Post: | ||
|
2011-01-23
, 17:30
|
Posts: 36 |
Thanked: 28 times |
Joined on Jul 2010
|
#6
|
echo export PATH=$PATH:/home/user >> .bash_profile # Copyright 2011 dave1010
|
2011-01-23
, 18:44
|
Posts: 539 |
Thanked: 165 times |
Joined on Feb 2010
@ Berlin, Germany
|
#7
|
It practically just convert it into commands for easy usage
Here is the download link
http://www.4shared.com/file/XSLdoyE8/cmdmaker.html
Copy the script to /root
Then launch xterm and type the following codes
Thanks
My blog
MY BLOG
--My brain lights up best in the toilet--
Last edited by pang; 2011-01-23 at 13:21.