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?

Tags:

Linux, Linux, Linux, Bash Scripting

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?
 
Expert Comment by Tintin:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by omarfarid:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by rickd12:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by omarfarid:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by Tintin:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by tjilp:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-46 / EE_QW_2_20070628