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
ARCMSR(4)						   BSD Kernel Interfaces Manual 						 ARCMSR(4)

NAME
arcmsr -- Areca Technology Corporation SATA/SAS RAID controller SYNOPSIS
arcmsr* at pci? dev ? function ? DESCRIPTION
The arcmsr driver provides support for the PCI-X and PCI Express RAID controllers from Areca Technology Corporation: - ARC-1110 PCI-X 4 Port SATA RAID Controller - ARC-1110ML PCI-X 4 Port SATA RAID Controller - ARC-1120 PCI-X 8 Port SATA RAID Controller - ARC-1120ML PCI-X 8 Port SATA RAID Controller - ARC-1130 PCI-X 12 Port SATA RAID Controller - ARC-1130ML PCI-X 12 Port SATA RAID Controller - ARC-1160 PCI-X 16 Port SATA RAID Controller - ARC-1160ML PCI-X 16 Port SATA RAID Controller - ARC-1170 PCI-X 24 Port SATA RAID Controller - ARC-1200 Rev A PCI Express 2 Port SATA RAID Controller - ARC-1202 PCI Express 2 Port SATA RAID Controller - ARC-1210 PCI Express 4 Port SATA RAID Controller - ARC-1220 PCI Express 8 Port SATA RAID Controller - ARC-1230 PCI Express 12 Port SATA RAID Controller - ARC-1230ML PCI Express 12 Port SATA RAID Controller - ARC-1231ML PCI Express 12 Port SATA RAID Controller - ARC-1260 PCI Express 16 Port SATA RAID Controller - ARC-1260ML PCI Express 16 Port SATA RAID Controller - ARC-1261ML PCI Express 16 Port SATA RAID Controller - ARC-1280 PCI Express 24 Port SATA RAID Controller - ARC-1280ML PCI Express 24 Port SATA RAID Controller - ARC-1680 PCI Express 8 Port SAS RAID Controller - ARC-1680LP PCI Express 8 Port SAS RAID Controller - ARC-1680i PCI Express 8 Port SAS RAID Controller - ARC-1680x PCI Express 8 Port SAS RAID Controller - ARC-1681 PCI-X 8 Port SAS RAID Controller These controllers support RAID levels 0, 1, 1E, 3, 5, 6, and JBOD using either SAS or SATA II drives. arcmsr supports management and monitoring of the controller through the bioctl(8) and envstat(8) commands. Please note, however, that to use some features that require special privileges, such as creating/removing hot-spares, pass-through disks or RAID volumes will require to have the password disabled in the firmware; otherwise a Permission denied error will be reported by bioctl(8). When a RAID 1 or 1+0 volume is created, either through the bioctl(8) command or controller's firmware, the volume won't be accessible until the initialization is done. A way to get access to the sd(4) device that corresponds to that volume without rebooting, is to issue the fol- lowing command (once the initialization is finished): $ scsictl scsibus0 scan any any The arcmsr driver will also report to the kernel log buffer any error that might appear when handling firmware commands, such as used by the bioctl(8) command. EVENTS
The arcmsr driver is able to send events to powerd(8) if a volume or any drive connected to the volume 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), scsictl(8) HISTORY
The arcmsr driver first appeared in NetBSD 5.0. AUTHORS
The arcmsr driver was originally written for OpenBSD by David Gwynne. It was ported to NetBSD and extended by Juan Romero Pardines. BSD
March 3, 2008 BSD