LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-15-2009, 03:39 AM   #1
Moody1
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Rep: Reputation: 0
Unhappy Shell Programming, newbie


Hello,
i'm completely new to linux and shell programing
i'm using linux fedora v.8, bash
i want to know how to print argument value depending on other argumet value.
ex. i have two txt files
the first one includes 2 arguments $1, $2 (these values r entered through program)
the second one includes 2 arguments $3, $2 (these values r entered through program)
now through shell program the user will enter $3 value, so i want through this value to print $1 value, any help?


- then i want to know how to consider each word that entered by user as an argument and how to print the third word (as an ex.)
ex. the user will enter this line;
test test1 test2 test3 test4 ....
so how to print the third word?

i hope that my questions are clear

thanks in advance
 
Old 10-15-2009, 04:22 AM   #2
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 38
I'm having a little trouble working out exactly what you're asking. Can you post some sample code, so we can see what you've tried and get more of a feel for exactly what you want?
 
Old 10-15-2009, 05:52 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Its a double post.
 
  


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




All times are GMT -5. The time now is 03:41 AM.

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