commandbox.system.modules_app.system-commands.commands

Class head

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

Show the first x lines of a file. Path may be absolute or relative to the current working directory. . {code:bash} head file.txt {code} Displays the contents of a file to standard CommandBox output according to the number of lines argument. . Use the "lines" param to specify the number of lines to display, or it defaults to 15 lines. . {code:bash} head file.txt 100 {code}

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any ansiFormatter


    • access = public
    • returntype = any
    • inject = AnsiFormatter
    true false
    any printUtil


    • access = public
    • returntype = any
    • inject = print
    true false
    Method Summary
    any run(any path, [numeric lines='15'])
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    ansiFormatter

    property any ansiFormatter

    Attributes:
    access - public
    required - false
    returntype - any
    inject - AnsiFormatter
    serializable - true

    printUtil

    property any printUtil

    Attributes:
    access - public
    required - false
    returntype - any
    inject - print
    serializable - true

    Method Detail

    run

    public any run(any path, [numeric lines='15'])

    Parameters:
    path - file or directory to tail or raw input to process
    lines - number of lines to display.