grep

  1. CaffeineAddict

    Solved Help with regex and grep

    I'm working on a collection of commands to run against wordlists for optimization and have 3 questions regarding the command below. The command (including vague description) is: # Get rid of passwords containing non-ascii or non-visible characters (except for the space) grep --extended-regexp...
  2. K

    What is the difference between -E and -e in grep in Kali Linux?

    What is the difference between -E and -e in grep in Kali Linux? Because both are for regexp so which one is better to use and why? And the difference between both.
  3. CaffeineAddict

    Which variants of grep are deprecated?

    I know fgrep and egrep are deprecated because same functionality exists with grep -E and grep -F But what about pgrep and rgrep? are these 2 deprecated as well? For rgrep there is grep -r but I don't find any mention of rgrep being deprecated. pgrep seems unique and still valid, so it's not...
  4. hal_sk

    Using command outputs in another scripts

    Hello, Sometime I need to extract specific value (or more values) from my system using command outputs (in order to use this values for conditional testing in scripts). For example: Get my CPU temperature and if it is above 60 °C then do something. For this scenario I use command "watch -n 2...
  5. M

    egrep "[0-9]{2}" not working

    Hello, Im sorry to bother you with this, but I´m new to this and need help to get it working properly. I need to get only the lines that don´t start with number and have two digit number in them. I have this command: cat /etc/group | egrep -v "^[0-9]" | egrep "[0-9]{2}" And the problem is...
  6. D

    SOLVED: Using grep to display from the start of match

    Can grep be used only show results from the start of match? Example, there is a text file with... iliketurtles iliketurtles [TAB]iliketurtles asgfhasfgshailiketurtles ^%&%&%*&iliketurtles The results I want to return would look like... iliketurtles iliketurtles iliketurtles iliketurtles...
  7. M

    Monitoring with sound

    Hi, How can i get a sound while monitoring a file using tail with grep. E.g. Tail -f log.file | grep 'Network' If there any display with the following command there the system should produce a sound/soundtrack so that we need not to keep an eye always on the log file and the sound will alert...
  8. M

    Search directory and search File

    How can i first search with certain filename with wild card and then search a string in those filename and get the output. E.g Directory name : abc/def/xyz/ Files in directory : Abc12, abc13, abd12,abc14,abc15, abe12 and so on. First search : ab*12 Output : abc12,abd12,abe12 Now search...
Top