LinuxQuestions.org
Visit Jeremy's Blog.
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 04-21-2008, 01:40 PM   #1
pramka
Member
 
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, 01:52 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.

Example:

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 http://tldp.org and get Bash Guide for Beginners. Then, get the Advanced Bash Scripting Guide. Look up redirection.
 
Old 04-22-2008, 02:55 AM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,062

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration