Sponsored Content
Top Forums Shell Programming and Scripting need help in finding a string and to send an email using shell script Post 302167887 by ranga27 on Friday 15th of February 2008 06:46:37 PM
Old 02-15-2008
Hi i tried with a sample file which has the list of keys

it gave me this output [expires: 2008-05-16]

but the require output is unicorn01516008 <uniccrn1@fund.com> [expires: 2008-05-16]

can you please correct me if i am doing anything wrong!!
 

10 More Discussions You Might Find Interesting

1. Solaris

Shell script to send email alert for core dump

Friends, I am in search for a shell script that is capable of running as a cronjob and have to send out an email when ever there is a CORE DUMP. Please post the hints to achieve my goal. Thanks in advance. (1 Reply)
Discussion started by: rtatineni
1 Replies

2. Shell Programming and Scripting

How to write a shell script to send an email to an id

Hi all, I want to know how to send an email using shell script ..... I tried a command call mail but it did not work.. Please any one reply.. With example if you know thanks.. Madhu (4 Replies)
Discussion started by: madhumathikv
4 Replies

3. Shell Programming and Scripting

make un shell script to send email

Hi, Someone Knows how to obtein a chain from a unix file, but not all the line, for exemple, for this file ,obtein only 902111111 and to keep the value, this value will be used to make a mailx. NF=ALL, SUBJ= FROM: SN=CD, SE=TOPCALL, NA=, N=902111111, N=TCLFI TO: SE=FAX, NA=, C1=... (0 Replies)
Discussion started by: peybol
0 Replies

4. Shell Programming and Scripting

How to send email once a day at certain time in unix shell script

hi, i have to send an email once a day at ceratin time say 22. i have tried with date commad, but not working.:( HOUROFTHEDAY=`date +'%H'` if ; then mailx -s "Info" emailid@org.com < $ProcessStatisticsFile fi Please help me... (5 Replies)
Discussion started by: sreelu
5 Replies

5. Shell Programming and Scripting

How to send email through shell script

Hi All, I am new to the unix , i have to deliver one script very urgently I have to write a shell script where i have i want to send email to specific email id in this script i want FROM to be parameterized and stored in a variable TO to be parameterized and stored in a variable... (3 Replies)
Discussion started by: nileshbhawsar
3 Replies

6. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

7. Shell Programming and Scripting

Shell script to send an email from the txt file

Hi Friends, Could you guys help me out of this problem... I need to send an email to all the users and the email has to be picked from the text file. text file contains the no. of records like: giridhar 224285 847333 giridhar276@gmail.com ramana 84849 33884 venkata.ramana@gmail.com... (6 Replies)
Discussion started by: giridhar276
6 Replies

8. Shell Programming and Scripting

Help with shell script to send email once

Hi Guys, I have this script which will monitor oracle db process if up or down.And I want it to send email if it's down and the time it's back to online. However my script just keep on sending "Email Up" if the db is up or "Email Down" if the db is down.Is there any way to trap it so that it... (5 Replies)
Discussion started by: d3xt3r
5 Replies

9. Shell Programming and Scripting

how to send html email from shell script

This is my below script which is working fine as it send only plain text email. So My question is- How can I modify my below script to send this as an HTML formatted email? I want to show the text color of this expression `(echo "100*$TEST2/$TEST1" | bc -l)` as `RED` in an email and that can be... (3 Replies)
Discussion started by: raihan26
3 Replies

10. Shell Programming and Scripting

Need command to capture word from shell script and send email

Hello Experts, Greeting to all of you. I have a requirement, that we have a shell script status.sh that check the status of server and server status shows as status.sh Enterprise Server - Running Admin Server - Shutdown Requirement is like whenever the output shows shutdown it should... (2 Replies)
Discussion started by: aks_1902
2 Replies
GETITIMER(2)						      BSD System Calls Manual						      GETITIMER(2)

NAME
getitimer, setitimer -- get/set value of interval timer LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/time.h> int getitimer(int which, struct itimerval *value); int setitimer(int which, const struct itimerval * restrict value, struct itimerval * restrict ovalue); DESCRIPTION
The system provides each process with three interval timers, defined in <sys/time.h>. The getitimer() call returns the current value for the timer specified in which in the structure at value. The setitimer() call sets a timer to the specified value, returning the previous value of the timer if ovalue is not NULL. A timer value is defined by the itimerval structure: struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; If it_value is non-zero, it indicates the time to the next timer expiration. If it_interval is non-zero, it specifies a value to be used in reloading it_value when the timer expires. Setting it_value to 0 disables a timer. Setting it_interval to 0 causes a timer to be disabled after its next expiration (assuming it_value is non-zero). The which parameter specifies the type of the timer: ITIMER_REAL timer decrements in real time. This timer is affected by adjtime(2) and settimeofday(2). A SIGALRM signal is delivered when this timer expires. ITIMER_VIRTUAL timer decrements in process virtual time. It runs only when the process is executing. A SIGVTALRM signal is deliv- ered when it expires. ITIMER_PROF timer decrements both in process virtual time and when the system is running on behalf of the process. It is designed to be used by interpreters in statistically profiling the execution of interpreted programs. Each time the ITIMER_PROF timer expires, the SIGPROF signal is delivered. Because this signal may interrupt in-progress system calls, programs using this timer must be prepared to restart interrupted system calls. ITIMER_MONOTONIC timer decrements in monotonic time. This timer is not affected by adjtime(2) and settimeofday(2). A SIGALRM signal is delivered when this timer expires. Note that: o Time values smaller than the resolution of the system clock are rounded up to this resolution (typically 10 milliseconds). o The interaction between setitimer() and alarm(3) or sleep(3) is unspecified by the specification. RETURN VALUES
If the calls succeed, a value of 0 is returned. If an error occurs, the value -1 is returned, and a more precise error code is placed in the global variable errno. ERRORS
Both functions may fail if: [EFAULT] The value parameter specified a bad address. [EINVAL] The which parameter was not a known timer type, or the value parameter specified a time that was too large to be handled. SEE ALSO
gettimeofday(2), select(2), sigaction(2), itimerval(3), timeradd(3) STANDARDS
The functions conform to IEEE Std 1003.1-2001 (``POSIX.1''). The later IEEE Std 1003.1-2008 (``POSIX.1'') revision however marked both as obsolescent, recommending the use of timer_gettime(2) and timer_settime(2) instead. HISTORY
The getitimer() function call appeared in 4.2BSD. The ITIMER_MONOTONIC functionality appeared in NetBSD 6.0. BSD
October 27, 2011 BSD
All times are GMT -4. The time now is 03:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy