I have a small bash script this paragraph greps / awk using the keyword.
But after adding additional codes: set var = "(......)" it prints only an empty line, not a paragraph.
So, I would like to ask if anyone knows how to properly pass awk output to a variable for output?
My codes are:
#!/bin/sh set var = "(awk 'BEGIN{RS=ORS="\n\n";FS=OFS="\n"}/FileHeader/' /root/Desktop /logs/Default.log)" echo $var;
Thanks!
linux awk paragraph
Java noob
source share