TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PANCHO
from: MARTIN GREGORIE
date: 2021-01-16 23:52:00
subject: Re: Battery Powered Proje

On Sat, 16 Jan 2021 23:30:34 +0000, Pancho wrote:

> On 16/01/2021 22:33, Martin Gregorie wrote:
>> On Sat, 16 Jan 2021 20:39:09 +0000, Pancho wrote:
>>
>>> On 16/01/2021 17:53, Martin Gregorie wrote:
>>>
>>>
>>>> sudo tail -f  /var/log/messages | awk -- '{ print $0 }'
>>>>
>>>> which works here.
>>>>
>> Messages added to /var/log/messages with the following command are
>> displayed almost instantly, though they aren't exactly readable since
>> the text is shown as a hex string:
>>
>> sudo echo "Another message" 2>&1 | logsave /var/log/messages -
>>
>>
> Why not just use the logger command?
>
> e.g.
>
> logger "Another message"
>
> You seem to be over complicating things: why redirect stderr to stdin
> 2>&1 from echo, echo doesn't need sudo, logsave /var/log/messages does
> need sudo, logsave is truncating /var/log/messages.
>
> The immediate response you are seeing is stderr from tail, which isn't
> being piped to awk at all. This error message is generated by tail -f
> because logsave truncates the file that is being tailed, logsave -a
> appends.
>
> The manual says pipes are buffered. My experiments say pipes are
> buffered.

So how come you're getting delays and I'm not?




--
--
Martin    | martin at
Gregorie  | gregorie dot org

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.