Advertisement

08.22.2008 at 01:58AM PDT, ID: 23669576 | Points: 500
[x]
Attachment Details

Linux Bash script, how to use the output from a line within the next line?

Asked by rickd12 in Shell Scripting, Linux Programming, Kernel And Operating System Specific Programming

Tags: , , ,

I am writing a bash script that needs to take the output from one line and use that within the next line, I am wondering if there is a way to do this, the example

1st line: return data
2nd line (output from "return data"): data1
3rd line: perform action on "data1"

I hope my example is clear.. so basically the I am wondering how could I automatically grab the output from the second line and then use that value within the 3rd line?
Start Free Trial
[+][-]08.22.2008 at 02:12AM PDT, ID: 22287978

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.22.2008 at 04:08AM PDT, ID: 22288439

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.22.2008 at 12:09PM PDT, ID: 22293164

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.22.2008 at 10:48PM PDT, ID: 22295938

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.23.2008 at 01:28AM PDT, ID: 22296221

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.23.2008 at 06:18AM PDT, ID: 22296810

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628