LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-17-2013, 12:39 PM   #31
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,153

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331

See the last few lines of post #16, above.

Note that this thread is more that a year old. Often posting to an old thread will result in no answers because nobody will look at thread that old. You'll have better luck if you start a new thread with your question.

Since you seem new to Linux, I recommend that you look in the tutorials section for general information about Linux Questions and other topics.

As a general answer, almost every command reads its input from the "standard input device," /dev/stdin, and sends its output to the "standard output device," /dev/stdout. (Any error messages are sent to the "standard error device," /dev/stderr.)

When you're using a terminal, you're "actually" running a program called the "shell" program. Almost always, that is a program called bash, although there are several other shell programs in common use. bash, and most of the other shell programs, use redirection operators (< << <<< > >>) to change the default to some other file. (The < operators change the input, the > ones the output.)

For example the command echo "Hello World!" would display Hello World on your terminal; echo "Hello World!" > example would create (or overwrite) a file called "example" (in your "current directory") containing that line. The cat command will copy a file (or a set of files) to the standard output.

Here's an example:
Code:
$ echo "Hello World"
Hello World
$ echo "Hello World" > example
$ cat example
Hello World
$ cat example example 
Hello World
Hello World
$ rm example
(The rm command, at the end, removes the "example" file.)
 
  


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
LXer: Comparing Kernel Dmesgs: Remove Timing Info and Diff Side by Side LXer Syndicated Linux News 0 08-04-2010 08:31 PM
X11 and TEXT mode dual monitor side by side marius_c Linux - General 0 10-30-2009 11:30 AM
Installing SUSE 11.1 side by side with Ubuntu already installed on a USB drive jjchavez Linux - Laptop and Netbook 2 09-12-2009 02:39 PM
LXer: Top Linux photo managers side-by-side LXer Syndicated Linux News 0 12-14-2006 07:33 PM


All times are GMT -5. The time now is 10:24 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