Solved

unix parameters

Posted on 2009-03-31
5
271 Views
Last Modified: 2012-05-06
my main script runs script2 whichreturns:
    typA
    typO
    typC
how can I now pipe this output so that script3 can now be called with them passed as parameters, like so:
script3 typA typO typC
0
Comment
Question by:NewtonianB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 400 total points
ID: 24035703
script3 `script2`
0
 

Author Comment

by:NewtonianB
ID: 24035797
one quick clarification, my script 2 is actually a unix command that I run from within my main script, i put it this way to reduce complexity
but regardless for testing this I actually put this command in script2.sh but it seems script2 was being fed as a string and not executing (i'm running this in macosx 10.5.6 terminal)

should I concatenate each line of script2 output and the command at the front then do an eval? how else would you do it, efficiency is my priority
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 100 total points
ID: 24036144
did you use ` ` quotes as omafarid specified,
or did you instead try to type ' ' quotes when you tried it?
0
 

Author Closing Comment

by:NewtonianB
ID: 31565137
great!!!!
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24036706
That's one of the reasons why I prefer using $(cmd) instead of `cmd` !
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question