to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's
# 1  
Old 06-05-2008
to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All,

Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.

I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode' commands for the same and those worked fine. Please find below the same.

X " ( cat /sastemp/body.txt; uuencode test.xls test.xls ) | mailx -s 'testing' 'abcd.gef@yahoo.com' "

Instead using the X command I want to use system() function & ${} to make the above more successful.

Thanks in advance.

Thanks for your time,
Manas
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Set default return address for all mails sent from mailx

Hi, I have a question about mailx in Red Hat: If I use 'mail userid@mydomain.com -- -f root@mydomain.com', the return mail address will be root@mydomain.com. How can I make all mails sent from this system use root@mydomain.com as return address by default? Thank you in advance! nz (1 Reply)
Discussion started by: aixlover
1 Replies

2. Shell Programming and Scripting

Managing awk return code over SSH command

Hello all, This bellow code works. I'm just trying to find a simplified way to achieve this. I'm sure there is an easier way and it must be to simple for me to find. Verify that the OS version is 6.1. If not exit the script. Of course if i just put a && exit 1 at the end of the ssh... (11 Replies)
Discussion started by: maverick72
11 Replies

3. Shell Programming and Scripting

How to get the return code of subroutines executed as standalone as command line in Perl ?

How to do I get the return code of a subroutine in a perl module if invoke the subroutine as standalone, I have an module say TestExit.pm and in that i have a subroutine say myTest() which is returns 12, if i were to call the subroutine from command line like CASE:1 ( Without an explict... (2 Replies)
Discussion started by: ennstate
2 Replies

4. Shell Programming and Scripting

Pick up the return code for every iteration and display the result only once in loop.

Hi All, I amlearning UNIX scripting. I have a small query. I would be thankful if any one helps me out. I have a below piece of code which delets the files. If file dosent have the permissions to delete a particular file I have used 2>>operator to track the error code. But my objective is... (1 Reply)
Discussion started by: manas6
1 Replies

5. Shell Programming and Scripting

Return code of command assigned to variable

How do I evaluate the result of a command assigned to a variable?? Example: var1=`cmd` rc=$? rc will be the result of the assignment rather than cmd since it executes after. How do I evaluate the result of the command itself? Cheers..:confused: (2 Replies)
Discussion started by: browndr
2 Replies

6. Shell Programming and Scripting

return code of a unix command

How to find out whether the command I executed is successful or unsuccessful(at commandlinet) Eg: say i execute the following command at command line rm * How do i find out whether my previous command is a success or failure. Thankyou. Best Regards, Ram. (1 Reply)
Discussion started by: ramky79
1 Replies

7. Shell Programming and Scripting

Mailx Return Email Command

Hi, I'm trying to use the Mailx Return Email Command with a file attachment. If I use the file attachment by itself, it works ok. But If I add the return email command, it won't attach the file to email. Subject, return_email_address Send_email_address, Body, attachment,... (1 Reply)
Discussion started by: lisa0703
1 Replies

8. UNIX for Advanced & Expert Users

Move command return with exit code of 2

I have a script which loads data files into Oracle and then moves each file into a 'processed' directory when each file has finished loading. Last night I found that the script was failing on the mv statement (with a return code 2) and the following message, mv: cannot access... (1 Reply)
Discussion started by: handak9
1 Replies

9. Shell Programming and Scripting

Regex to pick up name from the following including carriage return at end of the line

has anyone got any suggestions how i would pick up the string as part of a substitution inclusive of the carriage return. ie i want to pick up <<NAME>> from the PS output but the <<; seems to be on the line before the NAME. Any ideas are appreciated! ... (3 Replies)
Discussion started by: Shakey21
3 Replies

10. UNIX for Advanced & Expert Users

mailx in kornshell script passing return code to CA-Unicenter

I have a KornShell script that has successfully been scheduled through Cron. We are in the process of changing over from Cron to using CA-Unicenter. To negative test the script I put a bad return code in. At the bottom of the script an e-mail is sent using mailx and then the return code is set... (1 Reply)
Discussion started by: Connie
1 Replies
Login or Register to Ask a Question
MFI(4)							   BSD Kernel Interfaces Manual 						    MFI(4)

NAME
mfi -- LSI Logic & Dell MegaRAID SAS RAID controller SYNOPSIS
mfi* at pci? dev ? function ? DESCRIPTION
The mfi driver provides support for the MegaRAID SAS family of RAID controllers, including: - Dell PERC 5/e, PERC 5/i, PERC 6/e, PERC 6/i - Intel RAID Controller SRCSAS18E, SRCSAS144E - LSI Logic MegaRAID SAS 8208ELP, MegaRAID SAS 8208XLP, MegaRAID SAS 8300XLP, MegaRAID SAS 8308ELP, MegaRAID SAS 8344ELP, MegaRAID SAS 8408E, MegaRAID SAS 8480E, MegaRAID SAS 8708ELP, MegaRAID SAS 8888ELP, MegaRAID SAS 8880EM2, MegaRAID SAS 9260-8i - IBM ServeRAID M1015, ServeRAID M5014 These controllers support RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, RAID 50 and RAID 60 using either SAS or SATA II drives. Although the controllers are actual RAID controllers, the driver makes them look just like SCSI controllers. All RAID configuration is done through the controllers' BIOSes. mfi supports monitoring of the logical disks in the controller through the bioctl(8) and envstat(8) commands. EVENTS
The mfi driver is able to send events to powerd(8) if a logical drive in the controller is not online. The state-changed event will be sent to the /etc/powerd/scripts/sensor_drive script when such condition happens. SEE ALSO
intro(4), pci(4), scsi(4), sd(4), bioctl(8), envstat(8), powerd(8) HISTORY
The mfi driver first appeared in NetBSD 4.0. BSD
March 22, 2012 BSD