• shell 三剑客


    [aig_sg_12_tst@xen13-29 aig_sg_12_tst]$ grep --help
    Usage: grep [OPTION]... PATTERN [FILE]...
    Search for PATTERN in each FILE or standard input.
    PATTERN is, by default, a basic regular expression (BRE).
    Example: grep -i 'hello world' menu.h main.c

    Regexp selection and interpretation:
    -E, --extended-regexp PATTERN is an extended regular expression (ERE)
    -F, --fixed-strings PATTERN is a set of newline-separated fixed strings
    -G, --basic-regexp PATTERN is a basic regular expression (BRE)
    -P, --perl-regexp PATTERN is a Perl regular expression
    -e, --regexp=PATTERN use PATTERN for matching
    -f, --file=FILE obtain PATTERN from FILE
    -i, --ignore-case ignore case distinctions
    -w, --word-regexp force PATTERN to match only whole words
    -x, --line-regexp force PATTERN to match only whole lines
    -z, --null-data a data line ends in 0 byte, not newline

    Miscellaneous:
    -s, --no-messages suppress error messages
    -v, --invert-match select non-matching lines
    -V, --version print version information and exit
    --help display this help and exit
    --mmap ignored for backwards compatibility

    Output control:
    -m, --max-count=NUM stop after NUM matches
    -b, --byte-offset print the byte offset with output lines
    -n, --line-number print line number with output lines
    --line-buffered flush output on every line
    -H, --with-filename print the filename for each match
    -h, --no-filename suppress the prefixing filename on output
    --label=LABEL print LABEL as filename for standard input
    -o, --only-matching show only the part of a line matching PATTERN
    -q, --quiet, --silent suppress all normal output
    --binary-files=TYPE assume that binary files are TYPE;
    TYPE is `binary', `text', or `without-match'
    -a, --text equivalent to --binary-files=text
    -I equivalent to --binary-files=without-match
    -d, --directories=ACTION how to handle directories;
    ACTION is `read', `recurse', or `skip'
    -D, --devices=ACTION how to handle devices, FIFOs and sockets;
    ACTION is `read' or `skip'
    -R, -r, --recursive equivalent to --directories=recurse
    --include=FILE_PATTERN search only files that match FILE_PATTERN
    --exclude=FILE_PATTERN skip files and directories matching FILE_PATTERN
    --exclude-from=FILE skip files matching any file pattern from FILE
    --exclude-dir=PATTERN directories that match PATTERN will be skipped.
    -L, --files-without-match print only names of FILEs containing no match
    -l, --files-with-matches print only names of FILEs containing matches
    -c, --count print only a count of matching lines per FILE
    -T, --initial-tab make tabs line up (if needed)
    -Z, --null print 0 byte after FILE name

    Context control:
    -B, --before-context=NUM print NUM lines of leading context
    -A, --after-context=NUM print NUM lines of trailing context
    -C, --context=NUM print NUM lines of output context
    -NUM same as --context=NUM
    --color[=WHEN],
    --colour[=WHEN] use markers to highlight the matching strings;
    WHEN is `always', `never', or `auto'
    -U, --binary do not strip CR characters at EOL (MSDOS)
    -u, --unix-byte-offsets report offsets as if CRs were not there (MSDOS)

    `egrep' means `grep -E'. `fgrep' means `grep -F'.
    Direct invocation as either `egrep' or `fgrep' is deprecated.
    With no FILE, or when FILE is -, read standard input. If less than two FILEs
    are given, assume -h. Exit status is 0 if any line was selected, 1 otherwise;
    if any error occurs and -q was not given, the exit status is 2.

    Report bugs to: bug-grep@gnu.org
    GNU Grep home page: <http://www.gnu.org/software/grep/>
    General help using GNU software: <http://www.gnu.org/gethelp/>

    [aig_sg_12_tst@xen13-29 aig_sg_12_tst]$ awk --help
    Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
    Usage: awk [POSIX or GNU style options] [--] 'program' file ...
    POSIX options: GNU long options:
    -f progfile --file=progfile
    -F fs --field-separator=fs
    -v var=val --assign=var=val
    -m[fr] val
    -O --optimize
    -W compat --compat
    -W copyleft --copyleft
    -W copyright --copyright
    -W dump-variables[=file] --dump-variables[=file]
    -W exec=file --exec=file
    -W gen-po --gen-po
    -W help --help
    -W lint[=fatal] --lint[=fatal]
    -W lint-old --lint-old
    -W non-decimal-data --non-decimal-data
    -W profile[=file] --profile[=file]
    -W posix --posix
    -W re-interval --re-interval
    -W source=program-text --source=program-text
    -W traditional --traditional
    -W usage --usage
    -W use-lc-numeric --use-lc-numeric
    -W version --version

    To report bugs, see node `Bugs' in `gawk.info', which is
    section `Reporting Problems and Bugs' in the printed version.

    gawk is a pattern scanning and processing language.
    By default it reads standard input and writes standard output.

    Examples:
    gawk '{ sum += $1 }; END { print sum }' file
    gawk -F: '{ print $1 }' /etc/passwd

    [aig_sg_12_tst@xen13-29 aig_sg_12_tst]$ sed --help
    Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

    -n, --quiet, --silent
    suppress automatic printing of pattern space
    -e script, --expression=script
    add the script to the commands to be executed
    -f script-file, --file=script-file
    add the contents of script-file to the commands to be executed
    --follow-symlinks
    follow symlinks when processing in place; hard links
    will still be broken.
    -i[SUFFIX], --in-place[=SUFFIX]
    edit files in place (makes backup if extension supplied).
    The default operation mode is to break symbolic and hard links.
    This can be changed with --follow-symlinks and --copy.
    -c, --copy
    use copy instead of rename when shuffling files in -i mode.
    While this will avoid breaking links (symbolic or hard), the
    resulting editing operation is not atomic. This is rarely
    the desired mode; --follow-symlinks is usually enough, and
    it is both faster and more secure.
    -l N, --line-length=N
    specify the desired line-wrap length for the `l' command
    --posix
    disable all GNU extensions.
    -r, --regexp-extended
    use extended regular expressions in the script.
    -s, --separate
    consider files as separate rather than as a single continuous
    long stream.
    -u, --unbuffered
    load minimal amounts of data from the input files and flush
    the output buffers more often
    --help display this help and exit
    --version output version information and exit

    If no -e, --expression, -f, or --file option is given, then the first
    non-option argument is taken as the sed script to interpret. All
    remaining arguments are names of input files; if no input files are
    specified, then the standard input is read.

    GNU sed home page: <http://www.gnu.org/software/sed/>.
    General help using GNU software: <http://www.gnu.org/gethelp/>.
    E-mail bug reports to: <bug-gnu-utils@gnu.org>.
    Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.

    [aig_sg_12_tst@xen13-29 aig_sg_12_tst]$ find --help
    Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

    default path is the current directory; default expression is -print
    expression may consist of: operators, options, tests, and actions:

    operators (decreasing precedence; -and is implicit where no others are given):
    ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2
    EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2

    positional options (always true): -daystart -follow -regextype

    normal options (always true, specified before other expressions):
    -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf
    --version -xdev -ignore_readdir_race -noignore_readdir_race

    tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N
    -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME
    -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex PATTERN
    -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE
    -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN
    -readable -writable -executable
    -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N
    -used N -user NAME -xtype [bcdpfls]
    -context CONTEXT


    actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print
    -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit
    -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;
    -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;

    Report (and track progress on fixing) bugs via the findutils bug-reporting
    page at http://savannah.gnu.org/ or, if you have no web access, by sending
    email to <bug-findutils@gnu.org>.

  • 相关阅读:
    LeetCode 16 3sum closest
    LeetCode 15 3Sum
    LeetCode 14 Longest Common Prefix
    jQuery数组遍历
    jQuery DOM对象与jQuery对象转换
    jQuery选择器
    jQuery类和样式操作
    js节点操作
    js全选反选
    innerHTML和innerTEXT的区别
  • 原文地址:https://www.cnblogs.com/Andy-Shi/p/10931413.html
Copyright © 2020-2023  润新知