![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 01:25 PM |
| Why generate "ash and bash" different output for same bash script? | s. murat | Shell Programming and Scripting | 0 | 05-26-2008 08:19 AM |
| [BASH - KSH] Passing array to a function | ripat | Shell Programming and Scripting | 3 | 04-17-2008 09:17 AM |
| find options don't work in script | mattd | Shell Programming and Scripting | 3 | 04-30-2007 11:31 AM |
| Handeling multiple options in script | virus_stinger | Shell Programming and Scripting | 2 | 05-23-2006 02:31 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Passing options to a bash script
I'm just not sure where to start looking into this. I want to be able to create switches for my script. Back in the day I'd make my scripts interactive...you know: Code:
echo "what report do you want" echo "A)boxes with errors" echo "B)boxes with more than 5 errors" echo "C)Service groups that have thrown errors" read $1 if ... but now that seems kind of amateurish. I'd rather have a script where errorreport.sh -c made a list of boxes, errorreport.sh -m listed boxes with multiple errors and so on. I'm not asking anyone to give me a step by step on how to do this, I'd rather learn by doing, but I don't even know where to start. I've tried googling "adding switches to bash scripts" and the like, and I've been scanning my o'reiley books, but at quick glance I don't see what I'm looking for. If anyone could tell me where I might at least start reading up on this I'd appreciate it. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|