Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

unix parameters

Posted on 2009-03-31
5
Medium Priority
?
278 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 1600 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 400 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

722 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