Sponsored Content
Top Forums Shell Programming and Scripting Need help redirecting output to a file including errors Post 302562923 by mbak on Sunday 9th of October 2011 02:33:32 AM
Old 10-09-2011
I just had the typos while posting the script here and still having same issues as replied to COKEDUDE in my previous reply.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

redirecting output to file in network

Hi Experts, Is it possible to redirect the output of an unix command to file. when i "telnet" to a remote system and execute the redirection operation, such that the result should outputted to my system. $ telnet IPaddr2 username : zzzzz password : ******** IPaddr2>ls > file <- i... (1 Reply)
Discussion started by: anent
1 Replies

2. UNIX for Dummies Questions & Answers

redirecting output, including errors

what's the proper syntax to redirect output, including all errors? ls -la > direct.list makes out put file direct.list but if i'm running a script and i want to include the errors, would i type something like: myscript.scr 2> out_list.txt or will that get the errors only? (1 Reply)
Discussion started by: kymberm
1 Replies

3. Shell Programming and Scripting

Redirecting my output to a specific file

Hi guys am doing some checking inside my script and i want to redirect my output to a specific file for example checking if a move was successfully done and was writing on the screen whether the move was successful or not and now want to write same thing into a file... I am new to shell... (2 Replies)
Discussion started by: Lutchumaya
2 Replies

4. AIX

Redirecting Both to a file and std output

Hello Friends, Can some one help me how to redirect output of a file to both a file and std output? All the help would be greatly appreciated. Regards Sridhar (1 Reply)
Discussion started by: send2sridhar
1 Replies

5. Shell Programming and Scripting

Redirecting output to both console and to a file

Hi All, Is there a way in Bash we can redirection some output to both console and the file at the same time. ~Parag (2 Replies)
Discussion started by: paragkalra
2 Replies

6. Shell Programming and Scripting

Redirecting output of Make to file

Hi, I am unable to get this script to work as desired. Basically, if an argument "log" is sent into the script, it outputs the result of the Make to a file output.log. However, if the argument is not passed, I want the output to be just put on screen (no redirection). See code snippet below. #... (3 Replies)
Discussion started by: srujan45
3 Replies

7. Shell Programming and Scripting

Redirecting output to file

Hi, Below is the whole string which is to be redirected to the new file. su - oracle -c "exp $user/$pass file=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.dmp log=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.log tables=table1,table2 statistics=none" ... (3 Replies)
Discussion started by: milink
3 Replies

8. UNIX for Dummies Questions & Answers

redirecting the script output to more than 1 file

Hi, I want to redirect my script output to more than one file without printing the result to the screen. How to do that? ex: echo "hi" >> a.txt b.txt cat a.txt hi b.txt :confused: (2 Replies)
Discussion started by: boopathyvasagam
2 Replies

9. UNIX for Dummies Questions & Answers

Help with redirecting output to an HTML file

I'm very new to shell scripting and am practicing how to write a script, then redirect the output into an HTML file, and then email both the script and the HTML file to myself. I have created a script called sysinfo_page, and thought it would have redirected the output into the sysinfo_page.html... (3 Replies)
Discussion started by: braing
3 Replies

10. Shell Programming and Scripting

Redirecting output to file

Hi, I have created script which redirect the output to file.I am able to get the output in file but not in the format. Output :Content of the log which have 10 -15 lines. Actal :Line1 ..Line 2Line3 Line4 Line 5 Expected:Line1 Line 2 Line3 Please... (7 Replies)
Discussion started by: karthik771
7 Replies
repl(1mh)																 repl(1mh)

Name
       repl - reply to a message

Syntax
       repl [ msg ] [ +folders ] [ options ]

Description
       Use to reply to a message that you have received.

       By  default, replies to the current message in the current folder.  If you want to reply to another message, you can specify a message num-
       ber as the msg argument.  You can also specify a message in another folder by supplying a +folder argument.  You can supply both a msg  and
       a +folder argument.  If you specify a folder without giving a message number, will reply to the current message in the named folder.

       When  you  reply  to a message, automatically fills in the mail header for you, taking the information it needs from the mail header of the
       original message.  The following example shows how constructs the mail header for the return message:
       To: <Reply-To> or <From> or <sender>
       cc: <cc>, <To>, and yourself
       Subject: Re: <Subject>
       In-reply-to: Your message of <Date>.
       <Message-Id>
       Field names enclosed in angle brackets (< >) indicate the contents of the named field from the original message.

       Normally, replies to the original sender, and sends carbon copies to all the addressees on the original message.

       You can create a different mail header from the default and use it every time you reply to mail.  If you create an alternative mail  header
       and  store  it  in the file in your Mail directory, will use it instead of the default header file.  This must be an mhl file; see for more
       information.

       If you do not have a draft folder set up, creates your new draft in a file called in your Mail directory.  This file must be  empty  before
       you can create a new draft, which means that you can only store one draft at a time.  If it is not empty, the mail system will ask you what
       you want to do with the existing contents.  The options are:

       quit	 Aborts leaving the draft intact.

       replace	 Replaces the existing draft with the appropriate message form.

       list	 Displays the draft message.

       refile	 Refiles the existing draft message in the specified folder, and provides a new message form for you to complete.

       If you want to be able to have more than one draft at a time, you can set up a draft folder in your This allows you to keep as many  unsent
       drafts as space allows, and still create new messages as you wish.  To do this, make sure that the following line is in your
       Draft-folder: +drafts
       For more information on how to do this, see

       If  you	set  up a draft folder, all draft messages are created in that folder.	If you decide not to send the draft, by typing at the What
       now? prompt, the message is stored in the draft folder.	You can then re-edit the message, or send it at a later date, by  using  the  com-
       mand.

       Note that while in the editor, the message being replied to is available through a link named (assuming the default In addition, the actual
       pathname of the message is stored in the environment variable $editalt, and the pathname of the folder containing the message is stored	in
       the environment variable $mhfolder.  If your current working directory is not writable, the link named is not available.

Options
       -annotate
       -noannotate
		 Marks out the original message as replied to.	When the message is shown on the listing produced by it is marked with a dash (-).
		 The following lines are also added to the message:
		      Replied: date
		      Replied: addrs
		 where the address list contains one line for each addressee.  The mail system will annotate the message only if it is sent  imme-
		 diately.  If the message is not sent immediately, you can send it later with but the annotations will not take place.

       -cc all|to|cc|me
       -nocc all|to|cc|me
		 Specifies  who  will  receive copies of the reply.  By default the mail system sends the reply to the sender of the original mes-
		 sage, and copies to all other names in the To: and cc: lines.	You can change this behavior by using the -cc option.  This  sends
		 copies  of the replies only to the specified names.  There are four values: -cc all sends copies to all the names on the original
		 message; -cc to sends copies only to those names in the To: field; -cc cc sends copies only to those names in the cc: field;  and
		 -cc me sends a copy of the reply to yourself.

		 There	is also a -nocc option, which stops copies of the reply being sent to the named people.  It takes the same values as -cc .
		 So, for example, -nocc cc would stop replies being sent to the names in the cc: field of the original message.

       -draftfolder +folder
       -nodraftfolder
		 Specifies the folder in which the draft message is created.  If you do not send the draft, it is stored in this folder.

		 This option is usually set up in your See for more information.  If you have this option set up, you can override it by using the
		 -nodraftfolder option.

       -editor editorname
		 Specifies the editor you wish to use to write your reply.  The default editor provided is You can specify any legal ULTRIX editor
		 as an alternative.

		 You can also set up an editor in your file.  See for more details.

       -fcc +folder
		 Specifies a folder to receive copies of your reply.  More than one folder can be named, each preceded by -fcc .

       -filter filterfile
		 Specifies how the original message is formatted in the draft.	By default, the mail system does not include a copy of the  origi-
		 nal  message  in  your  reply.  If you use the -filter filterfile option, the original message may be included in your reply, and
		 formatted according to the information in the file you name.

		 The filter file for should be a standard form file for as will invoke to format the  message  being  replied  to.   There  is	no
		 default filter file for you must create your own.  A filter file that is commonly used is:
		 :
		 body:nocomponent,compwidth=9,offset=9
		 This outputs a blank line and then the body of the message being replied to, indented by one tab-stop.

       -form formfile
		 Varies  the appearance of the mail header for the reply.  The mail system will construct the header according to the instructions
		 in the named file.  In order for to operate correctly, this must be an mhl file; see for more information.  This option overrides
		 the header set up by the system file

       -help	 Prints out a list of valid options to the command.

       -inplace
       -noinplace
		 Causes annotation to be done in place, in order to preserve links to the annotated message.

       -noedit	 Calls	without  an  editor.  This option takes you straight to the What now?  (R)prompt, without allowing you to edit your reply.
		 This will usually produce a reply with no text in the body of the message.

       -query
       -noquery  Allows you to modify the list of recipients.  The mail system asks you whether each of  the  addresses  that  would  normally	be
		 placed in the To: and cc: fields should actually receive a copy of the reply.

       -width	 Sets the maximum width of the header line.  Lines exceeding this width are split.

       -whatnowproc program
       -nowhatnowproc
		 Specifies  an	alternative  program.  Normally, invokes the default program.  See for a discussion of available options.  You can
		 specify your own alternative to the default program using the -whatnowproc program option.  If you do specify your  own  program,
		 you should not call it

		 You  can  suppress  the program entirely by using the -nowhatnowproc option.  However, as the program normally starts the initial
		 edit, the -nowhatnowproc option will prevent you from editing the message.

       The default settings for this command are:

	      +folder defaults to the current folder
	      msg defaults to the current message
	      -cc all
	      -format
	      -noannotate
	      -nodraftfolder
	      -noinplace
	      -noquery
	      -width 72

Examples
       This example replies to message number 15 in the current folder:
       % repl 15

       The next example creates your reply in the folder If you decide not to send the draft reply, the mail system will store it in this folder:
       % repl -draftfolder +drafts

       The next example places a copy of your reply in your folder:
       % repl -fcc +copylog

Profile Components
       Path:		      To determine your Mail directory
       Alternate-Mailboxes:   To determine your mailboxes
       Draft-Folder:	      To find the default draft folder
       Editor:		      To override the default editor
       Msg-Protect:	      To set mode when creating a new message (draft)
       fileproc:	      Program to refile the message
       mhlproc: 	      Program to filter message being replied to
       whatnowproc:	      Program to ask the "What now?" questions

Files
       The default system reply template.

       The user-supplied alternative to the standard reply template.

       The user profile.

       The draft file.

See Also
       comp(1mh), dist(1mh), forw(1mh), prompter(1mh), send(1mh), whatnow(1mh), mh-format(5mh)

																	 repl(1mh)
All times are GMT -4. The time now is 11:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy