LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2012, 01:10 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,520

Rep: Reputation: 51
Providing arguments in the command line.


Hi: I want to do a bash script that process a file, say the script is do_some, which operates con file some_file. Now, the name of the file I want to provide it in the command line, that is, 'do_some some_file'. How do I do this?
 
Old 01-28-2012, 01:34 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Noticed you marked your thread as solved; Still need help?
 
Old 01-28-2012, 02:07 PM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
In case the OP (or anyone finding this thread) needs an answer to the question, see this (specifically the section "Positional parameters").
 
Old 01-28-2012, 04:13 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,520

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by corp769 View Post
Noticed you marked your thread as solved; Still need help?
No thank you. I look up "positional parameters" in bash man and had my problem solved.
 
Old 01-29-2012, 10:42 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Oh ok. For future reference, you should edit your first post and at least let us know that you have solved your issue, and provide an answer as well.

Cheers!

Josh
 
  


Reply


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
[SOLVED] Command line arguments ajeesh.tr Programming 1 04-01-2011 08:11 AM
command line arguments nickraj Programming 6 09-11-2006 02:01 PM
Command line arguments?? almagerenia Linux - Newbie 1 09-08-2006 05:05 AM
command line arguments containing ( Lotharster Linux - Newbie 3 01-05-2006 09:43 AM
Help with command line arguments ? synapse Linux - Newbie 2 02-23-2004 03:25 AM


All times are GMT -5. The time now is 04:50 PM.

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