commandbox.system.modules_app.system-commands.commands

Class grep

lucee.Component
    extended by commandbox.system.modules_app.system-commands.commands.grep

Search through string input and filter only matching lines. Pipe input in and supply a regular expression. . Find Brad's ForgeBox entries {code:bash} forgebox show | grep Brad {code} . Find recent install commands {code:bash} history | grep install {code} . Search log file for certain errors {code:bash} cat myLogFile.txt | grep "variable .* undefined" {code}

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
  • excludefromhelp : true
  •  
    Method Summary
    any run([any input=''], [any expression=''], [boolean count='false'])
     
    Methods inherited from class lucee.Component
    None

    Method Detail

    run

    public any run([any input=''], [any expression=''], [boolean count='false'])

    Parameters:
    input - The piped input to be checked.
    expression - A regular expression to match against each line of the input. Only matching lines will be output.
    count - Return only a count of the matched rows