Linux Notes

Table of Contents

Section 6: Viewing Text Files

Available through those commands:

cat

  • view file contents
$ cat <files>

Without argument, cat reads the standard input. Also, it can be used to paste few files into one:

$ cat file1 > file2 > file3

echo

  • writes a line of text on a standard out
$ echo [options] <text>

Options:

  • -n doesn't end the line with a return sign

Text options (inputted via " "):

  • \b backspace
  • \c no new line
  • \f page feed
  • \n new line
  • \digit an octal number, represents an ASCII character
  • \r return (enter)
  • \t tabulation
  • \v vertical tabulation
  • \\ backslash