LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Bash command line arguments (https://www.linuxquestions.org/questions/programming-9/bash-command-line-arguments-713211/)

msreddy999 03-20-2009 02:52 PM

Bash command line arguments
 
Hi,

I am writing a simple bash script that reads bunch of command line arguments and calls couple of other program passing those options.

When someone invokes,
myscript.sh arg1 arg2 arg3 arg4 arg5

file myscript.sh
program1 arg1 arg2 arg4
program2 arg1 arg3 arg3 arg5


How can I do this? Thanks.

Telemachos 03-20-2009 02:56 PM

Check for "Positional parameters" on this page.


All times are GMT -5. The time now is 03:28 PM.