Chapter-2 Special Tools Utilities Input Redirection - : Continuation................

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Continuation.................

CHAPTER-2

Special Tools Utilities

Input Redirection - <


Any command that read its input from stdin can have its input redirected to come from
another file.

For example:
$ cat flowers
Rose
Lotus
Jasmine
Marigold
$ sort < flowers

Output redirection -> & >>

Any command that produces output to stdout can be redirected to another file

For example:
$ who> who.out
$ ls> ls.out

'>' This command will create a new file if the file does not exist, or over file exists.

'>>' This command will create a new file if the file does not exist or appends file is already exists.

You might also like