Use the grep command to display the lines from the file teknoscript.txt that are comment lines (the comment lines are the lines that start with #).
Answers
Answer:
GNU @command{grep}:
Type this grep command in terminal in present working directory
grep -i '#.*'teknoscript.txt
Explanation:
grep command is used for pattern matching plain text in files using CLI
Here we used regular expressions
That is '#*'.
It indicated all the lines that start with # and next there should be any alphabets,........
Here * Indicates that after # there should be any characters,words........
After that we use the file name so that the data that beginning with # is being displayed from that file
Here file name is technoskript.txt
Use the grep command to display the lines from the file teknoscript.txt that are comment lines (the comment lines are the lines that start with #).
grep command
Explanation:
Type this grep command in terminal in present working directory
grep -i '#.*'teknoscript.txt
grep command is used for pattern matching plain text in files using CLI
Here we used regular expressions :
That is '#*'.
It indicated all the lines that start with # and next there should be any alphabets.
Here * Indicates that after # there should be any characters,words
After that we use the file name so that the data that beginning with # is being displayed from that file
Here file name is technoskript.txt