1 |
On Sunday 22 August 2010 17:50:02 Alan McKinnon wrote: |
2 |
> Apparently, though unproven, at 18:44 on Sunday 22 August 2010, Mick did |
3 |
> opine |
4 |
> |
5 |
> thusly: |
6 |
> > > No, it's saying it wants EOF on a line all by itself with no leading |
7 |
> > > whitespace. That thing that looks like a backtick is an open quote. |
8 |
> > |
9 |
> > Hmm ... so what should the corrected logrotate script look like then? |
10 |
> > |
11 |
> > cat << |
12 |
> > |
13 |
> > EOF |
14 |
> > |
15 |
> > | /usr/bin/chronyc | sed '/^200 OK$/d' |
16 |
> > |
17 |
> > password $PASSWORD |
18 |
> > cyclelogs |
19 |
> > EOF |
20 |
> > |
21 |
> > endscript |
22 |
> > } |
23 |
> |
24 |
> Change the other EOF instead. |
25 |
> |
26 |
> It's a "here document", search for that phrase in man bash to find out |
27 |
> more. It tells bash what will cause input redirection from stdin to end. |
28 |
> The first EOF is the string to look for, the second one is the trigger |
29 |
> that ends input |
30 |
|
31 |
Thanks Alan, I think I got it now. :-) |
32 |
-- |
33 |
Regards, |
34 |
Mick |