Simple Unix/Linux Text Editing Command

-Print

cat

synopsis   : cat [OPTION]… [FILE]…

description: concatenate files and print on the standard output

tac

synopsis   : tac [OPTION]… [FILE]…

description: concatenate and print files in reverse

-Compare

cmp

synopsis   : cmp [-c] [-i N] [-l] [-s] [-v] file1 file2

description: compare two files

diff

synopsis   : diff [-b] [-i] [-t] [-w] [-c] [-C] [-e] [-f] [-h] [-n] [-D string] [-l] [-r] [-s] [-S name] [file1 file2 ] [directory1 directory2]

description: find differences between two files

diff3

synopsis   : cmp [ -l  | -s ] file1 file2 [ skip1 [ skip2 ] ]

description: find differences between three files

comm

synopsis   : comm [ -1 | -2 | -3 ] file1 file2

description: compare two sorted files line by line


-Delete

colrm

synopsis   : colrm [startcol [endcol]]

description: emove columns from a file

column

synopsis   : column [ -tx ] [ -c culumns ] [ -s sep ] [ file .... ]

description: columnate lists

cut

synopsis   : cut [-b] [-c] [-f] list [-n] [-d delim] [-s] [file]

description: remove sections from each line of files

uniq

synopsis   : uniq [-c | -d | -u ] [ -f fields ] [ -s char ] [-n] [+m] [input_file [ output_file ] ]

description: remove duplicate lines from a sorted file


-File split

csplit

synopsis   : csplit [-k] [-s] [ -f prefix ] [ -n number ] file arg1 argn

description: split a file into sections determined by context lines

split

synopsis   : split [-linecount | -l linecount ] [ -a suffixlength ] [file [name] ]

description: split a file into pieces


-Replace,Convert

expand

synopsis   : expand [ -t tablist ] [-tabstop] [-tab1, tab2,. . ., tabn] [ file ... ]

description: convert tabs to spaces

unexpand

synopsis   : expand [ -t tablist ] [-tabstop] [-tab1, tab2,. . ., tabn] [ file ... ]

description: convert spaces to tabs

tr

synopsis   : tr [-c] [-d] [-s] [string1] [string2]

description: translate or delete characters


-Text Formatting

fmt

synopsis   : fmt [-c] [-s] [-w width | -width ] [inputfile]

description: simple optimal text formatter

fold

synopsis   : fold [ -bs ] [-w width | -width] [file]

description: wrap each input line to fit in specified width


-File Merge

paste

synopsis   : paste [-s] [-d list] file

description: merge lines of files


저작권
Creative Commons License