LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How do I program in shell script for write a word if it finds another word (https://www.linuxquestions.org/questions/programming-9/how-do-i-program-in-shell-script-for-write-a-word-if-it-finds-another-word-941227/)

bal_nair1 04-23-2012 12:45 AM

How do I program in shell script for write a word if it finds another word
 
I have a file named medpre.msg.log
Script should search for a word 'degenerated'
If it finds the word 'degenerated' , then it should write 'ECHT' on already existing file Mcheck.prot

How should I write the program, please help me . I am new to shell scripting


Thank you in advance......

pan64 04-23-2012 01:40 AM

see grep

druuna 04-23-2012 01:41 AM

Hi,

Cross-posting is against the LQ rules. Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place.

Continue in the other/original thread: How do I program in shell script.....

Reported for closure.


All times are GMT -5. The time now is 07:01 PM.