Thanks for the template but my scenario is that validation needs to be done not only for "Date" part but also for the "name" part since there can be more than one person in a shift.. so there should be some scenario wherin u can get the name and compute their EMPID ..
Hi ,
I am in the last part of this ., can anyone please help me how to send a mail to the group of mail ids got in the variable 'e'...
mail -s "Hello" e., is it right????
Hi .,
I m struck here., cud u plz help...
I have changed some logic in this system., I have loaded my .csv file in another table and now comparing the two tables and fetching the mail id in the variable "e"
The code i used to send mail is
where onshore is the table made from .csv file.,
i m unable to send the mail., when i execute the script it stands till timeout and gets closed without sending mail...
Thanks in advance...
---------- Post updated 07-08-11 at 11:01 AM ---------- Previous update was 07-07-11 at 06:10 PM ----------
Hi .,
When i execute
alone., i could view the result wen i give echo $e.,
MAILID -------------------------------------------------- ram@abc.comhari@abc.comraj@abc.com MAILID -------------------------------------------------- ram@abc.comhari@abc.comraj@abc.com., but there are only 3 rows in the database.. why i am getting duplicate here???
And also i couldnt send mail using this
mailx -s "You are in shift today" $e., wen i execute i get "mail: illegal option -- ----" error ., Where i went wrong...!!????
Last edited by Franklin52; 07-08-2011 at 03:43 AM..
Reason: Please use code tags for code and data samples, thank you
#!/bin/bash
hostname=$1; shift
for hostname in $1
do
ping $hostname
done
I want to run the above script as hostname.sh yahoo.com google.com cnn.com. I want to shift each hostname to $1. How can do that with above code as currently it's not shifting. (5 Replies)
Hello Expert
Can any one please explain what is the use of shift command in general terms:
set -- $(ls -t)
shift
rm -Rf $*
what is the use of shift command over here.
Thanks a lot for your help (2 Replies)
Hi,
Firstly, I did a search for this question both on this site and on the internet and have not been able to find a suitable answer that is not general in nature.
I have always been a Windows user. I use my girl friend's mac every now and then, but I always come back to windows. For a... (1 Reply)
Hi,
I wrote one script, in between script needs to use 10th and 11th positional parameters, that time i used "shift". Here i am facing the below find problem,
./DataCount.sh: cannot shift
I tried
1) I have read man pages for shift
2) Before but * and **
3) Simple shift with out giving... (4 Replies)
Hi Folks,
In shell scripting the maximum no. of command line parameters becomes 9(Am i right). If we want to get more than 9 parameters we use the shift command.
Even here there are two possibilities.
1. Without the use of variables - The arguments are lost and the lost no. is equal to the... (6 Replies)
There is an error when i am trying to use the shift command in this way:
($1 = -d, $2 = 123, $3 = -c etc etc)
for $arg in $@
do
case $arg in
"-d") shift; (so that the $2 will become the $arg now)
(and while it loop the 2nd time,)
... (1 Reply)