Print variable on screen

Hi,

I've stored the output of a command into a variable.
The variable contains the following output:
[INFO ] outputline1 [INFO ] outputline2 [INFO ] outputline3 ...

How can I echo the variable so that the output is as follow and not one line:
[INFO ] outputline1
[INFO ] outputline2
[INFO ] outputline2
...

Thanks a lot!

hi... can you paste part of that code that does the printing ??

Regards,
A!

is it that you are storing the complete output in one variable ??

Hi,

Can't paste the code but what I do is:

set -x
variable=<command>
echo $variable

what I see in the output is
[INFO ] outputline1 [INFO ] outputline2 [INFO ] outputline3 ...

but what I would like in the output is
[INFO ] outputline1
[INFO ] outputline2
[INFO ] outputline2
...

When I only execute the command without redirecting to a variable the output is also:
[INFO ] outputline1
[INFO ] outputline2
[INFO ] outputline2
...

But I need the output also in a variable to work with it but keeping it on the screen as before.

Hope it makes sense.

The solution echo "$variable"
An example

$ var=$(ls -1)
$ echo $var
dir1/ dir2/ grep_with_context.txt my_test.sh tree tree.sed tree.sed
$ echo "$var"
dir1/
dir2/
grep_with_context.txt*
my_test.sh
tree*
tree.sed*
$

Jean-Pierre.

Superb!

Thanks a lot!!