linuxMaestro
Instructor
I have a simple shell script
echo `cat file | grep hello`
but it prints the output like
hello katie hello sam hello ralph hello linus
but when I run it from the command line it prints like this...
hello katie
hello sam
hello ralph
hello linus
Which is how I want the shell script to print it.
How can I get the shell script to print it that way?
echo `cat file | grep hello`
but it prints the output like
hello katie hello sam hello ralph hello linus
but when I run it from the command line it prints like this...
hello katie
hello sam
hello ralph
hello linus
Which is how I want the shell script to print it.
How can I get the shell script to print it that way?