Question: 1 . Write a grep command that will look for single - line comments in the both files ( log 3 . py and log
Write a grep command that will look for singleline comments in the both files logpy and logc Note: a Python singleline comments can start with # while C singleline comments start with b Lines that start with #include or #define should not be matched. c The matched singlecomments should start with line; lines has code and end with a singlesingle line comment should not be matched. d To simplify the BRE, you can use Linux pipelining to run two grep commands backtoback where the matched lines by the first grep command are passed as input to the second grep command lines. e You can use the v option in grep to exclude lines that match the BRE instead of including them. For example, you can have the output from the first grep command match all lines that start with # or and then exclude those lines that start with #include or #define in the second grep command.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
