linux + print the values in the same line

yael

when we print the variable data_data_dir , we get:

echo $data_data_dir
sdb sdc sdd sde sdf

but when we print it with the following approach the we get the value not in the same line

echo  "[`date +%d"/"%b"/"%G"-"%T`] $data_data_dir"
[27/Dec/2017-10:58:08] sdb
sdc
sdd
sde
sdf

while we want it as the following ( expected results )

[27/Dec/2017-10:58:08] sdb sdc sdd sde sdf 
Thomas

Just do not quote $data_data_dir

echo  "[`date +%d"/"%b"/"%G"-"%T`]" $data_data_dir

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

print the same values in a list of dicts on same line

From Dev

Print 2 values in the same line, from 2 for loops

From Dev

Print output on the same line

From Dev

same line print in c

From Dev

Print output on the same line

From Dev

Python: for loop - print on the same line

From Dev

Multiple awk to print in the same line

From Dev

Python: for loop - print on the same line

From Dev

bash displays print on the same line

From Dev

awk print output on same line

From Dev

Print awk output on the same line

From Dev

Read something in the same print line

From Dev

'print' command in Python (print in the same line)

From Dev

How to print values on single line

From Dev

jq - print values in one line

From Dev

How to print a line and type input in the same line

From Dev

how to print text and variable's values in the same line with Serial.println in Arduino

From Dev

Print line having two instances of same string in same line

From Dev

Print line having two instances of same string in same line

From Dev

How to print matched lines in same line?

From Dev

Is it possible to print the awk output in the same line

From Dev

Print on the same line, step after step

From Dev

loop and print stars in same line unix command

From Dev

How to print new data on the same line?

From Dev

Print out onto same line with ":" separating variables

From Dev

awk - print data before RS, same line

From Dev

Python print on same line after sleep

From Dev

Print on same line at the first in python 2 and 3

From Dev

How to print 2 items on the same line