alhassani54
Programmer
Hi
I have a text UNIX file (file1), the file contains one line and the line contains spaces as.
Abc 1234567 abcdef log 123456789,456789
If I do grep from the shell I will get the line as in the file.
$grep log file1
$Abc 1234567 abcdef log 123456789,456789
But if I assign the grep to a variable the spaces will be removed as.
$var=$(grep log file1)
$print $var
$ Abc 1234567 abcdef log 123456789,456789
Is it possible to print the line as in the file?
Any help will be appreciated
Thank you
I have a text UNIX file (file1), the file contains one line and the line contains spaces as.
Abc 1234567 abcdef log 123456789,456789
If I do grep from the shell I will get the line as in the file.
$grep log file1
$Abc 1234567 abcdef log 123456789,456789
But if I assign the grep to a variable the spaces will be removed as.
$var=$(grep log file1)
$print $var
$ Abc 1234567 abcdef log 123456789,456789
Is it possible to print the line as in the file?
Any help will be appreciated
Thank you