Custom Commands
Hi, I'm new to linux, I've CentOS on my server and i wanted to know how to make custome commands to perform tasks,
like some shell hosters have made commands like ' get-psy ' to install psybnc itself , 'get-irc' this command will configure,make & intall some irc software itself... etc etc. So How do we do this? |
Why would you want to do that? On CentOS you'd just run "yum install whateverprogramyouwant", isn't that simple enough? creating such a trivial script to remove a lot of the flexibility seems really strange.
|
Hi,
Welcome to LQ! I agree with the Mod but if you want to understand the script then look at 'Advanced Bash-Scripting Guide'. The above link and others available from 'Slackware-Links'. More than just SlackwareŽ links! |
Thanks
Thanks for your reply acid and onebuck. Actually Its Not Just For Downloading And Installing, I wanted to put some more custom commands, like restart-psy...to restart the psybnc etc etc. kind of shortcut keys. And Also Wanted to learn more, like I want to put some script in the motd which shows the name of the software and processes running like:
Number of IRCd's Running ..... (0) Number Of PsyBnc's RUnning .... (3) NUmber Of Eggdrop's Running .... (6) etc etc. Is there some pre-made scripts for this purpose available? |
well certainly you could create them with a bash script:
#!/bin/bash /etc/init.d/psybnc restart or an alias: alias restart-psy='/etc/init.d/psybnc restart' But as above, it's a little too trivial to bother with I think. In terms of mining out additional data, then sure, a shell script or such would be ideal if there's nothing to do it already. Quite what it would actually do I couldn't say though... |
All times are GMT -5. The time now is 10:23 PM. |