innova
11-09-2004, 03:06 PM
I know this will probably be exceedingly simply but I cannot even think of how to do this right now.
Lets say I have a variable called 'var1'. It contains several lines of stuff (bash shell):
echo "$var1"
This displays:
One
Two
Three
Four
Five
How can I specify that I want to display ONLY line 2, or line 4? I need to display an ARBITRARY line from that variable's data. If only I could do:
echo "$var1" | displayline 3
I hope that makes sense. Probably something really silly I am forgetting...
Lets say I have a variable called 'var1'. It contains several lines of stuff (bash shell):
echo "$var1"
This displays:
One
Two
Three
Four
Five
How can I specify that I want to display ONLY line 2, or line 4? I need to display an ARBITRARY line from that variable's data. If only I could do:
echo "$var1" | displayline 3
I hope that makes sense. Probably something really silly I am forgetting...
