css-team: proofread
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@284 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
parent
eeabe1dc1c
commit
cbd1c1830c
4 changed files with 10 additions and 10 deletions
site/pages/cmd/advanced
|
@ -9,7 +9,7 @@ previous-page: pages/cmd/advanced/grep.html
|
|||
next-page: pages/cmd/advanced/nl.html
|
||||
---
|
||||
|
||||
The <code>head</code> command reads the first few lines of any text given to it as an input
|
||||
The <code>head</code> command reads the first few lines of any text given to it as input
|
||||
and writes them to standard output.<br>
|
||||
If more than one input file is provided, head will return the first ten lines
|
||||
from each file, precede each set of lines by the name of the file and separate
|
||||
|
|
|
@ -8,7 +8,7 @@ title: nl
|
|||
previous-page: pages/cmd/advanced/head-tail.html
|
||||
next-page: pages/cmd/advanced/paste.html
|
||||
---
|
||||
The <code>nl</code> is a command that permits to number the lines.
|
||||
<code>nl</code> is a command that allows you to number the lines.
|
||||
Through some flags you can decide how to filter this command.<br>
|
||||
|
||||
We have a file named <code>example.txt</code> that contains 5 elements, to test this command:
|
||||
|
@ -21,7 +21,7 @@ Smartphone
|
|||
Videogame
|
||||
{% endhighlight %}
|
||||
|
||||
The syntax command is:
|
||||
The syntax is:
|
||||
<pre> nl [flags][file] </pre>
|
||||
|
||||
<pre>
|
||||
|
@ -33,12 +33,12 @@ nl example.txt
|
|||
5 Videogame
|
||||
</pre>
|
||||
|
||||
How you can see the command has numbered the lines.
|
||||
As you can see, the command has numbered the lines.
|
||||
|
||||
<h2>Flags</h2>
|
||||
|
||||
<ul>
|
||||
<li> <b>-b (regex)</b>: Specify the lines to be numered
|
||||
<li> <b>-b (regex)</b>: Specify the lines to be numbered
|
||||
<pre>
|
||||
nl -b p^[cv] example.txt
|
||||
1 Car
|
||||
|
|
|
@ -12,7 +12,7 @@ next-page: pages/cmd/advanced/pipes.html
|
|||
The <code>paste</code> command is used to join files horizontally
|
||||
(parallel merging) by outputting lines consisting of the sequentially corresponding
|
||||
lines of each file specified, separated by tabs, to the standard output.<br>
|
||||
Once involved, <code>paste</code> will read all its file arguments. For each corresponding line,
|
||||
Once invoked, <code>paste</code> will read all its file arguments. For each corresponding line,
|
||||
paste will append the contents of each file at that line to its output along with a tab.
|
||||
When it has completed its operation for the last file, <code>paste</code> will output a newline
|
||||
character and move on to the next line.
|
||||
|
@ -31,7 +31,7 @@ paste [flags] [file1] [file2] ...
|
|||
paste -d "|" file1.txt file2.txt
|
||||
paste -d "|," file1.txt file2.txt</pre>
|
||||
</li>
|
||||
<li><code>-s</code>, which causes paste to append the data in serial rather than in parallel;
|
||||
<li><code>-s</code>, which causes paste to append the data serially rather than in parallel;
|
||||
that is, in a horizontal rather than vertical fashion.
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -9,10 +9,10 @@ previous-page: pages/cmd/advanced/paste.html
|
|||
next-page: pages/cmd/advanced/tr.html
|
||||
---
|
||||
|
||||
The <code>pipes</code> that in the shell are representend with the symbol | ,
|
||||
they are used to join two commands on the terminal, taking the output of the first
|
||||
The <code>pipes</code>, which in the shell are represented with the symbol | ,
|
||||
are used to join two commands on the terminal, taking the output of the first
|
||||
command and using it as input of the second.<br>
|
||||
It is usually common to see the command <code>grep</code> and <code>ps</code> together,
|
||||
It is common to see the commands <code>grep</code> and <code>ps</code> together,
|
||||
an example below.<br>
|
||||
|
||||
Example: lists all processes with your username
|
||||
|
|
Loading…
Reference in a new issue