1 |
On Tue, Mar 25, 2008 at 12:11 PM, Kaushal Shriyan <kaushalshriyan@×××××.com> |
2 |
wrote: |
3 |
|
4 |
> On Mon, Mar 24, 2008 at 11:22 PM, Kaushal Shriyan < |
5 |
> kaushalshriyan@×××××.com> wrote: |
6 |
> |
7 |
> > On Mon, Mar 24, 2008 at 9:13 PM, Kaushal Shriyan < |
8 |
> > kaushalshriyan@×××××.com> wrote: |
9 |
> > |
10 |
> > > On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield <kutulu@××××××.org> |
11 |
> > > wrote: |
12 |
> > > |
13 |
> > > > Kaushal Shriyan wrote: |
14 |
> > > > > Hi I have the following entry in the crontab |
15 |
> > > > > |
16 |
> > > > > MAILTO=systems@×××××××.com |
17 |
> > > > > 0 18 * * * /home/kaushal/rsync_mysql.sh |
18 |
> > > > > |
19 |
> > > > > I want my subject line to be "hostxx:yyDB refresh daily" |
20 |
> > > > > |
21 |
> > > > > is there a way to do it |
22 |
> > > > > |
23 |
> > > > > Thanks and Regards |
24 |
> > > > > |
25 |
> > > > > Kaushal |
26 |
> > > > > |
27 |
> > > > |
28 |
> > > > The easiest way is to write a wrapper script; I have a few of them |
29 |
> > > > that |
30 |
> > > > do something like: |
31 |
> > > > |
32 |
> > > > |
33 |
> > > > ( |
34 |
> > > > echo "From: songbird.jungle <root@××××××××.jungle>" |
35 |
> > > > echo "To: Michael Edenfield <kutulu@××××××.org>" |
36 |
> > > > echo "Subject: Portage Update Report" |
37 |
> > > > echo "" |
38 |
> > > > |
39 |
> > > > # do stuff here. |
40 |
> > > > |
41 |
> > > > ) | sendmail kutulu@××××××.org |
42 |
> > > > |
43 |
> > > > -- |
44 |
> > > > gentoo-user@l.g.o mailing list |
45 |
> > > > |
46 |
> > > > |
47 |
> > > |
48 |
> > > Hi, |
49 |
> > > |
50 |
> > > I have two scripts file one is http://pastebin.com/m263e6f3c and |
51 |
> > > http://pastebin.com/m175098db. |
52 |
> > > |
53 |
> > > The requirement is run http://pastebin.com/m175098db script once the |
54 |
> > > below line succeeds in the http://pastebin.com/m263e6f3c |
55 |
> > > |
56 |
> > > if /usr/bin/rsync -av /var/lib/mysql host77:/var/lib/ > |
57 |
> > > /tmp/rsync-${TIMESTAMP}.log 2>&1 |
58 |
> > > then |
59 |
> > > /usr/bin/mailx -s "Success: host77 DB refresh daily" |
60 |
> > > kaushal@×××××××.com < /tmp/rsync-${TIMESTAMP}.log |
61 |
> > > |
62 |
> > > I am not able to proceed |
63 |
> > > |
64 |
> > > Thanks and Regards |
65 |
> > > |
66 |
> > > Kaushal |
67 |
> > > |
68 |
> > |
69 |
> > Hi |
70 |
> > |
71 |
> > I have combined the script http://pastebin.com/m77e0e752, is it ok |
72 |
> > |
73 |
> > Thanks and Regards |
74 |
> > |
75 |
> > Kaushal |
76 |
> > |
77 |
> > |
78 |
> |
79 |
> Hi Collin, |
80 |
> |
81 |
> I have http://pastebin.com/d65195b48, I want to know how much time it |
82 |
> takes to execute the script, |
83 |
> |
84 |
> I know the time command |
85 |
> |
86 |
> { time sudo /usr/bin/rsync -av /var/lib/mysql kaushal@host77:/var/lib/; } |
87 |
> 2>/tmp/time.output |
88 |
> |
89 |
> is there a way to call the time command inside the |
90 |
> http://pastebin.com/d65195b48 script |
91 |
> |
92 |
> Thanks and Regards |
93 |
> |
94 |
> Kaushal |
95 |
> |
96 |
|
97 |
|
98 |
Hi Collin |
99 |
|
100 |
I could incorporate the time command in my script |
101 |
http://pastebin.com/d1324bbd8 |
102 |
|
103 |
http://pastebin.com/d1324bbd8 is the modified script. Just wanted to know |
104 |
the elasped time in minutes instead of seconds |
105 |
|
106 |
Thanks and Regards |
107 |
|
108 |
Kaushal |