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
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.
Comments