805828caa7
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@84 a672b425-5310-4d7a-af5c-997e18724b81
37 lines
1.1 KiB
HTML
37 lines
1.1 KiB
HTML
---
|
||
layout: page
|
||
category: Intermediate commands
|
||
tags: cat
|
||
author: Fabiano Fenini
|
||
title: CAT
|
||
next-page: ""
|
||
---
|
||
|
||
<p>The <code>cat</code> command can be easily associated to the word “concatenation” but it doesn’t have that only function: in fact, cat command gives us the possibility to create files and also to display them.
|
||
</p>
|
||
The name stands for <i>catenate</i>.
|
||
|
||
<h2>Usage<h2>
|
||
|
||
<p>The default cat command syntax is:
|
||
|
||
<pre>
|
||
cat [flags] [--] [file1] [file2 ...] ]
|
||
</pre>
|
||
|
||
Where [flags] are the cat flags, read below for more info, [--] indacates that the following parameters won't be considered as flags, while the file parameters indicates the names of one or more files to concatenate.
|
||
Between the names of two files is possible to use the shell redirection symbol ">", in order to redirect the output to the file considered.
|
||
|
||
</p>
|
||
|
||
<h2>Flags<h2>
|
||
|
||
<p>Here are some of the most common cat flags:
|
||
|
||
<ul>
|
||
<li> <b>-n</b>: Display the line numbers of a file </li>
|
||
<li> <b>-e</b>: Display "$" at the end of the line and also where there is a gap between paragraphs </li>
|
||
<li> <b>-T</b>: Display TAB characters </li>
|
||
</ul>
|
||
|
||
</p>
|