LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-11-2005, 10:27 PM   #1
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Slackware,Bluewhite64
Posts: 252

Rep: Reputation: 30
stdout stdin


I'm a little confused if I'm correct or not, I'm thinking this might be painfully obvious

If I was to do:

$ ls
file1
file2
file3
dir1
dir2

file* and dir* are stdout, correct?

I'm just a little hazy on what standard input is. Would me typing "ls" be stdin?

Or would this be a better example:

$ dc
2 2 * p
4

Is 2 2 * p stdin? or just 2 2? Or is my thinking way off base?
 
Old 08-11-2005, 10:39 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
stdin is basically any typed (or piped) input to a program. For example, the "2 2 * p" is stdin to dc. Commands at the prompt are stdin to bash. Stdout is MOST of what's printed on the screen. There's also stderr, which is where error messages should be printed. Generally, stdout and stderr look the same to users, though they can be separated using output redirection.
 
Old 08-11-2005, 10:55 PM   #3
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Slackware,Bluewhite64
Posts: 252

Original Poster
Rep: Reputation: 30
ok ... simple enough ... thanks
 
Old 08-11-2005, 11:00 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
No problem. I hope my explanation cleared things up better than it confused things.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stdout And Stdin: Can't get it to do it "on the fly"... Eskild Programming 4 07-19-2005 12:41 PM
Statistics from stdin? edeca Linux - Software 0 05-23-2005 10:03 AM
redirecting stdin and stdout with pipes: convincing apps they're for a terminal? prell Programming 1 09-02-2004 06:38 AM
redirect stdin/stdout of running process xtravar Linux - Software 3 03-06-2004 07:54 PM
stdin -> port -> stdout acid_kewpie Linux - Networking 5 04-12-2002 06:01 AM


All times are GMT -5. The time now is 10:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration