I have a following file
A Query 3 ms
B Query 4 ms
A Query 5 ms
I have written grep command to extract the path I required.
temp=`grep A acces.log | grep Query `
Putting that in temp variable is removing “\n” from the output.
How to force bash not to remove \n ?
Sorry for my bad communication
I am getting following o/p like
A Query 3 ms A query 5 ms
I need o/p in following format
A Query 3 ms
A query 5 ms
You need use double quotes: