Thursday, October 1, 2020

Grep

 

  • To search the string under the current directory recursively

  • grep –irl “String” *

    • –i:  case insensitive

    • –r: search recursively under the directory

    • –l: Display only the filename

    • –v: Display the non matching line

      • Useful for deleting the sentence

    • –c : count the number of occurrences of the particular sequence.

      • grep –c “hello” filename.txt

      • It is working only in the shell script not in the terminal . why I don’t know.

No comments:

Post a Comment

Minicom

 Installation sudo apt install minicom Configuration Giving permission to user for accessing the serial port chmod 666 /dev/ttyUSB0 after th...