From 39366733c3fe943363566756e2e152c45a1b3cb2 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Fri, 25 May 2018 23:29:36 +0000 Subject: Fri May 25 23:29:36 UTC 2018 patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.2.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific. --- slackbook/html/file-commands-output.html | 147 ------------------------------- 1 file changed, 147 deletions(-) delete mode 100644 slackbook/html/file-commands-output.html (limited to 'slackbook/html/file-commands-output.html') diff --git a/slackbook/html/file-commands-output.html b/slackbook/html/file-commands-output.html deleted file mode 100644 index e2419b27..00000000 --- a/slackbook/html/file-commands-output.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - -Simple Output: cat and echo - - - - - - - - - - - -
-

10.3 Simple -Output: cat and echo

- -
-

10.3.1 cat

- -

cat(1) is short for “concatenate”. It was -originally designed to merge text files into one, but can be used for many other -purposes.

- -

To merge two or more files into one, you simply list the files after the cat command and then redirect the new output to a file. cat works with standard input and standard output, so you have to -use the shell redirection characters. For example:

- - - - - -
-
-% cat file1 file2 file3 > bigfile
-
-
- -

This command takes the contents of file1, file2, and file3 and merges it all -together. The new output is sent to standard out.

- -

One can also use cat to display files. Many people cat text files through the more or less commands, like this:

- - - - - -
-
-% cat file1 | more
-
-
- -

That will display the file1 file and pipe it through the more command so that you only get one screen at a time.

- -

Another common use for cat is copying files. You can copy any -file around with cat, like this:

- - - - - -
-
-% cat /bin/bash > ~/mybash
-
-
- -

The /bin/bash program is copied to your home directory and -named mybash.

- -

cat has many uses and the ones discussed here are just a few. -Since cat makes extensive use of standard input and standard -output, it is ideal for use in shell scripts or part of other complex commands.

-
- -
-

10.3.2 echo

- -

The echo(1) command displays the specified text on the -screen. You specify the string to display after the echo -command. By default echo will display the string and print a -newline character after it. You can pass the -n option to -suppress the printing of the newline. The -e option will cause -echo to search for escape characters in the string and execute -them.

-
-
- - - - - -- cgit v1.2.3