Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article
Related Items

•  Unix in a NutShell.

•  The Unix Shell - Part One.


   LinuxPlanet / Tutorials



The Unix Shell - Part II
Introduction,Standard Input and Output.

Steve Singer
Thursday, September 2, 1999 11:02:12 AM

Introduction

At first glance many people think the Unix Shell is a more cryptic version of the MS-Windows/DOS command prompt. However, the Unix shell can do much more than launch programs and copy files. Sequences of commands can be strung together in "Shell Scripts" to automate tedious or repetitive tasks. Unix systems provide a series of tools that are helpful when writing shell scripts. Typically each tool performs a specific task, accepting input from the "standard input" source and sending its output to the "standard output source".

Standard Input and Output

Non-Graphical Unix programs typically read input from what is called the "standard input stream." When a program is started up from the command line, standard input (STDIN) defaults to the keyboard. Characters typed on the keyboard are sent to the program for processing. Similarly, the standard output (STDOUT) of a program started from the command line is the screen. Normal output destined for the user's screen is sent to STDOUT, but error messages are often sent to the standard error device (STDERR); by default STDERR goes to the screen as well. Sometimes you don't want program output to go to the screen; it might be more convenient to save to a file, or have your program read from a file. Redirection allows you to easily accomplish this.

Next: Redirection, Pipes and Variables »

Skip Ahead

1 Introduction,Standard Input and Output.
2 Redirection, Pipes and Variables
3 Summary





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers