View the step-by-step solution to:

$ gawk 'BEGIN {print "Daemon >>" }/Daemon/ ' long Daemon >> [ OK ] Listening on PC/SC Smart Card Daemon Activation Socket. Starting LSB: VMWare Tools...


$ gawk 'BEGIN {print "Daemon >>" }/Daemon/ ' long

Daemon >>

[ OK ] Listening on PC/SC Smart Card Daemon Activation Socket.

           Starting LSB: VMWare Tools Daemon...

           Starting Name Service Cache Daemon...
[ OK ] Started Name Service Cache Daemon.
[ OK ] Started LSB: VMWare Tools Daemon.
           Starting OpenSSH Daemon...
[ OK ] Started OpenSSH Daemon.


Question: 

I need to print "Daemon >>" in the beginning of each line. Please help. 

Seems like it only printed out in the beginning of the file. Its need to be in each line.  I am probably not using the write method for this.

Seeking for advice. Thanks

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question