Wc: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 45: | Line 45: | ||
=NL võtmed= | =NL võtmed= | ||
<pre> | <pre> | ||
-b, --body-numbering=STYLE use STYLE for numbering body lines | |||
-d, --section-delimiter=CC use CC for separating logical pages | |||
-f, --footer-numbering=STYLE use STYLE for numbering footer lines | |||
-h, --header-numbering=STYLE use STYLE for numbering header lines | |||
-i, --line-increment=NUMBER line number increment at each line | |||
-l, --join-blank-lines=NUMBER group of NUMBER empty lines counted as one | |||
-n, --number-format=FORMAT insert line numbers according to FORMAT | |||
-p, --no-renumber do not reset line numbers at logical pages | |||
-s, --number-separator=STRING add STRING after (possible) line number | |||
-v, --starting-line-number=NUMBER first line number on each logical page | |||
-w, --number-width=NUMBER use NUMBER columns for line numbers | |||
--help display this help and exit | |||
--version output version information and exit | |||
</pre> | </pre> | ||
Revision as of 10:39, 30 October 2017
WC(WordCount) ja NL(Number Lines)
Autor: Andres Kalavus
Rühm: A21
VALMIMISEL
WC
Word count ehk wc on Linuxi käsklus mis väljastab antud faili(de) ridade, sõnade, karakterite ja baidi arvu.
WC Süntaks
wc [VÕTMED]... [FAIL]... wc [VÕTMED]... --files0-from=F
WC Võtmed
-c, --bytes Prindib baidi arvu -m, --chars Prindib karakterite arvu -l, --lines Prindib ridade arvu --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - then read names from standard input -L, --max-line-length Prindib pikima rea pikkuse -w, --words Prindib sõnade arvu --help Väljastab abi --version Väljastab versiooni
WC Näited
Näide ühe ja kahe sisendfaili andmisest käsklusele wc.
Esimene arv näitab ridade arvu, teine arvnäitab sõnade arvu ja kolmas arv näitab karakterite arvu. Kui anda mitu sisendfaili, siis tuleb viimasele reale summa.
NL
Linuxi käsklus number lines aitab nummerdada tekstifaile lisades ridadele ette numbreid. Nummerdamis stiili on vastavalt vajadusele võimalik muuta.
NL süntaks
nl [VÕTMED]... [FAIL]...
NL võtmed
-b, --body-numbering=STYLE use STYLE for numbering body lines -d, --section-delimiter=CC use CC for separating logical pages -f, --footer-numbering=STYLE use STYLE for numbering footer lines -h, --header-numbering=STYLE use STYLE for numbering header lines -i, --line-increment=NUMBER line number increment at each line -l, --join-blank-lines=NUMBER group of NUMBER empty lines counted as one -n, --number-format=FORMAT insert line numbers according to FORMAT -p, --no-renumber do not reset line numbers at logical pages -s, --number-separator=STRING add STRING after (possible) line number -v, --starting-line-number=NUMBER first line number on each logical page -w, --number-width=NUMBER use NUMBER columns for line numbers --help display this help and exit --version output version information and exit
NL näited
Kokkuvõte
Allikad
https://alvinalexander.com/unix/edu/examples/wc.shtml http://linuxcommando.blogspot.com.ee/2008/06/how-to-number-each-line-in-text-file-on.html