Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-21-2008, 02:40 PM   #1
Registered: May 2007
Location: ny
Distribution: fedora
Posts: 33

Rep: Reputation: 15
Book to Learn Shell Scripting

What is the command I have to use in a script so that the messages (not output)generated by say Jobname: backup will be stored in a file
msg > /tmp/processinginfo_backup
Old 04-21-2008, 02:52 PM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
When you run any process in Linux, input, output, and errors are tied to default devices: stdin, stdout, and stderr.(descriptors 0, 1, and 2) Any of these can be permanently or temporarily re-directed.


command 2>errorfile

This runs "command" and re-directs any error messages to the file named "errorfile"

To answer the question in your title: Go to and get Bash Guide for Beginners. Then, get the Advanced Bash Scripting Guide. Look up redirection.
Old 04-22-2008, 03:55 AM   #3
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Assuming that youare interested in the title of your post, rather than the text "Beginning Linux Programming, Stones, Wrox".


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
how to learn shell scripting G.Verma Linux - Laptop and Netbook 2 10-17-2007 07:55 AM
Good Book on Shell Scripting? paragkalra Linux - General 3 07-07-2007 08:29 AM
Good Book on Shell Scripting? paragkalra Programming 1 07-07-2007 07:26 AM
shell scripting book? newbie9500 Linux - Newbie 3 10-24-2005 01:14 AM
Want to learn Shell Scripting dawood Linux - General 3 08-04-2004 07:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:24 AM.

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