Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-20-2009, 02:52 PM   #1
LQ Newbie
Registered: Apr 2004
Posts: 6

Rep: Reputation: 0
Bash command line arguments


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, arg1 arg2 arg3 arg4 arg5

program1 arg1 arg2 arg4
program2 arg1 arg3 arg3 arg5

How can I do this? Thanks.
Old 03-20-2009, 02:56 PM   #2
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
Check for "Positional parameters" on this page.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line arguments bioinformatics_guy Linux - Newbie 2 02-12-2009 07:26 AM
need some help regarding command line arguments kristam269 Linux - General 1 01-23-2007 09:40 AM
command line arguments nickraj Programming 6 09-11-2006 01:01 PM
Command line arguments?? almagerenia Linux - Newbie 1 09-08-2006 04:05 AM
command line arguments containing ( Lotharster Linux - Newbie 3 01-05-2006 08:43 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration