Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » CommandsRSS Feeds

Redirection in unix

Posted By: Tia Hughes     Category: Unix / Linux / Ubuntu     Views: 4995

Redirection in unix language.

In the terms of redirection terminal is the generic name which is the display and the board.
They are actually the stream of the characters which many commands may treat as input / output.

They are standard input attach to the board.
standard output attach to the display.
standard error. 

Standard error

use to redirect the input from the file
wc < test-04.sh

Take the input from the file and the standard input

cat - foo. 
Takes the standard input and then from foo.
cat foo - bar.
Takes the input from the foo and then standard input and then
bar.

Standard Output

wc sample.txt > newfile.
cat newfile.

To append the contents of a file to the existing file

wc sample.txt >> newfile.

  
Share: 


Didn't find what you were looking for? Find more on Redirection in unix Or get search suggestion and latest updates.

Tia Hughes
Tia Hughes author of Redirection in unix is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!