theshell.ch/site/pages/cmd/interm/cat.html
bevilj b46207e079 interm: add pages by @tomazj
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@261 a672b425-5310-4d7a-af5c-997e18724b81
2018-11-18 22:31:01 +00:00

38 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: page
category-page: intermediate
category-title: Intermediate commands
tags: cat content file show concatenate
author: Fabiano Fenini
title: cat
previous-page: pages/cmd/interm/caffeinate.html
next-page: pages/cmd/interm/chroot.html
---
The <code>cat</code> command can be easily associated to the word “concatenation” but
it doesnt have that only function: in fact, cat command gives us the possibility to create
files and also to display them.<br>
The name stands for <i>catenate</i>.<br>
<h3>Usage</h3>
The default cat command syntax is:
<pre>
cat [flags] [--] [file1] [file2] [file...]
</pre>
Where [flags] are the <code>cat</code> 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 "&gt;",
in order to redirect the output to the file considered.<br><br>
<h3>Flags</h3>
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>