Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] chrony logrotate script EOF error
Date: Sun, 22 Aug 2010 16:53:41
Message-Id: 201008221850.02745.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] chrony logrotate script EOF error by Mick
1 Apparently, though unproven, at 18:44 on Sunday 22 August 2010, Mick did opine
2 thusly:
3
4 > > No, it's saying it wants EOF on a line all by itself with no leading
5 > > whitespace. That thing that looks like a backtick is an open quote.
6 >
7 > Hmm ... so what should the corrected logrotate script look like then?
8 >
9 > cat <<
10 > EOF
11 > | /usr/bin/chronyc | sed '/^200 OK$/d'
12 > password $PASSWORD
13 > cyclelogs
14 > EOF
15 > endscript
16 > }
17
18
19 Change the other EOF instead.
20
21 It's a "here document", search for that phrase in man bash to find out more.
22 It tells bash what will cause input redirection from stdin to end. The first
23 EOF is the string to look for, the second one is the trigger that ends input
24
25 --
26 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] chrony logrotate script EOF error Mick <michaelkintzios@×××××.com>