SendEmail - Script reading database file with sleep command
Hello,
I would like to send email message to my mail list.
I have been running linux based server and I submitted this process manually up to now.
I would like to send each individual with a shell script.
In ssh panel, I tested below command and it works smoothly.
I created all ssh lines for each member and put them into a ssh file, then run the script. Here it is:
sendmail.sh
If I do not put "sleep" command in shell script, the server gives error.
In ssh panel:
My excel file is in below form:
Do not know which file extension should be used instead of excel file.
How can I change above script so that it reads mail-list database file and submit email to each member one by one with five seconds of interval.
There are some tools that can directly read Excel files, but an easy way to process data from an Excel spreadsheet is to export that data into a CSV (comma separated values) format file. You can then easily use the shell read command (with IFS=","), awk (with FS=","), and lot of other tools to extract the data you want from the CSV file and invoke sendEmail in a loop.
This User Gave Thanks to Don Cragun For This Post:
The problem I am having now is calling and reading a command and The Main script reads the data file and passes the input to the two calculation scripts, and than output to a file.
1.
The Main Script
-----------------
input=inputfilepj3
output=outfilepj3
echo "*** Converting... (2 Replies)
Hi,
I'm new to Red Hat. i have a database "work1" which has a table "dd_interface". This table has a column "ip", i have displayed this ip on the command terminal, i want this ip to be assigned eth0.... Can anyone help me with this????
Regards,
Owais
---------- Post updated at 02:54 PM... (1 Reply)
I have a script that send email using sendEmail (CentOS shell)
script is:
sendEmail -vvv -u "TestCompany, Inc.: USB Added" -f user@domain.com -t To@domain.com -s ASPMX.L.GOOGLE.com -m "USB Activity" -o tls=aut
o username=user3@domain.com password=password
So far this works fine.
Now i... (5 Replies)
Hello,
I want to read a rpm database through my program in c ,I searched for it and found there is one library openly available that is rpmlib thorugh which we can access rpm databse but I want to use it from windows is it possible to read one rpm database from windows,I want to read the... (4 Replies)
Hi Forum.
I have a script that accepts 3 input parameters (source directory, list file text, sleep time) and checks for the presence of files. If not there, script goes to sleep for certain amount of time provided by 3rd input.
list file text contains 1 entry but may contain more (file... (13 Replies)
Hi,
I need to connect to DB through my shell script. but I dont want to hardcode my db password in the script. Is there a way to do it?
Thanks
---------- Post updated at 07:42 PM ---------- Previous update was at 04:54 PM ----------
:(Guys..please help me with this:( (1 Reply)
Hi All,
Please help me in writing data to a file in one row.
In database there is a column which contains large data which does not fit in the file in one row. The column contains list of paths. I want to write these paths to a file in one row.
Please find the code below writes :
... (2 Replies)
I wrote some expect script to telnet to some device to execute some commands.Firstly,I can't get full result some time,then I try to add some "sleep" command in it.Fortunately it works.
My idea about it is that it uses sleep command to wait the result to be displayed.Am I right or correct the... (4 Replies)
Hi....can you guys help me out in this script??
Below is a text file and it contains these:
GEF001 000093625 MKL002510 000001 000000 000000 000000 000000 000000 000001
GEF001 000093625 MKL003604 000001 000000 000000 000000 000000 000000 000001
GEF001 000093625 MKL005675 000001... (4 Replies)
Hi List,
How to read the output of a command executed from a script.
For ex.
sample_scritp.sh
-------------
useradd testuser1
password testuser1
....
.....
--------------
This prompts for "password", and "confirm password", for which i need to give the values from script.
Can... (4 Replies)