Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #25783 > unrolled thread

Battery Powered Project

Started bySimple Simon <please.dontspa@me.com>
First post2021-01-12 12:14 +0000
Last post2021-01-17 13:53 +0000
Articles 9 on this page of 89 — 22 participants

Back to article view | Back to comp.sys.raspberry-pi


Contents

  Battery Powered Project Simple Simon <please.dontspa@me.com> - 2021-01-12 12:14 +0000
    Re: Battery Powered Project Chris Green <cl@isbd.net> - 2021-01-12 12:40 +0000
      Re: Battery Powered Project Simple Simon <please.dontspa@me.com> - 2021-01-12 12:50 +0000
        Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-12 15:15 +0100
        Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-12 21:43 +0000
          Re: Battery Powered Project Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2021-01-13 09:40 +0000
          Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-13 18:02 +0000
          Re: Battery Powered Project Joe <joe@jretrading.com> - 2021-01-13 22:04 +0000
            Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-13 23:37 +0000
              Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-14 00:43 +0000
              Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 03:59 +0000
              Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 10:18 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 11:04 +0000
                  Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 11:46 +0000
                    Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 12:21 +0000
                      Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 12:38 +0000
                      Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-14 14:17 +0000
                        Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 14:28 +0000
                          Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-16 20:09 +0000
                            Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-17 07:19 +0000
                              Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-17 15:57 +0000
                                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-18 07:05 +0000
                                  Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-18 14:14 +0000
                              Re: Battery Powered Project John Aldridge <jpsa@cantab.net> - 2021-01-17 17:52 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-14 12:56 +0000
                Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-14 13:46 +0000
                  Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 14:26 +0000
            Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 03:46 +0000
              Re: Battery Powered Project Folderol <general@musically.me.uk> - 2021-01-14 09:23 +0000
                Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 11:04 +0000
                  Re: Battery Powered Project Folderol <general@musically.me.uk> - 2021-01-14 17:48 +0000
              Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-18 17:07 +0000
                Re: Battery Powered Project Joe <joe@jretrading.com> - 2021-01-18 20:33 +0000
                  Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-21 20:36 +0000
    Battery Powered Project nospam.Vincent.Coen@f1.n250.z2.binkp.net (Vincent Coen) - 2021-01-12 14:35 +1300
    Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-12 16:40 +0000
      Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-13 13:56 +0000
        Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-13 15:12 +0000
          Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 12:24 +0000
            Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 17:53 +0000
              Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 20:39 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 22:33 +0000
                  Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 23:30 +0000
                    Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 23:52 +0000
                      Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-17 10:39 +0000
                        Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-17 14:32 +0000
                          Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-18 13:20 +0000
                            Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-18 13:41 +0000
                              Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-18 14:02 +0000
                                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-18 15:15 +0000
                                  Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 13:46 +0000
                                    Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 15:24 +0000
                                      Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 15:34 +0000
                                        Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 16:21 +0000
                                          Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 17:18 +0000
                                            Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-19 19:31 +0000
                                              Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 10:12 +0000
                                            Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 22:15 +0000
                                              Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 10:03 +0000
                                                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 10:49 +0000
                                                  Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 11:29 +0000
                                                    Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 12:18 +0000
                                                    Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 13:02 +0000
                                                      Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 15:49 +0000
                                                        Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-20 16:54 +0000
                                                        Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 17:19 +0000
                                                          Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-21 10:24 +0000
                                                  Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 12:18 +0000
                                                    Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 13:18 +0000
                                                      Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 14:14 +0000
                                                        Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 14:51 +0000
                                                      Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 14:45 +0000
                                                      Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 14:44 +0000
                                                        Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-20 15:07 +0000
                                                          Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-20 16:38 +0100
                                                          Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 15:45 +0000
                                                        Re: Battery Powered Project druck <news@druck.org.uk> - 2021-01-21 10:07 +0000
                                                          Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-21 12:30 +0100
                                                            Re: Battery Powered Project druck <news@druck.org.uk> - 2021-01-21 13:09 +0000
                                                              Re: Battery Powered Project Anssi Saari <as@sci.fi> - 2021-01-22 10:08 +0200
                                                                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-22 10:29 +0000
                                                                Re: Battery Powered Project Chris Green <cl@isbd.net> - 2021-01-22 10:25 +0000
                                    Re: Battery Powered Project Kees Nuyt <k.nuyt@nospam.demon.nl> - 2021-01-19 17:03 +0100
                  Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-17 01:09 +0000
              Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-17 11:48 +0000
                Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-17 12:11 +0000
                Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-17 14:43 +0000
              Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-17 11:52 +0000
                Re: Battery Powered Project Andy Burns <usenet@andyburns.uk> - 2021-01-17 13:53 +0000

Page 5 of 5 — ← Prev page 1 2 3 4 [5]


#26025

FromMartin Gregorie <martin@mydomain.invalid>
Date2021-01-22 10:29 +0000
Message-ID<rue9dv$7st$1@dont-email.me>
In reply to#26023
On Fri, 22 Jan 2021 10:08:25 +0200, Anssi Saari wrote:

> By the way, since I haven't seen this mentioned, Debian provides a tool
> to manage those symlinks in /etc/alternatives, it's called
> update-alternatives. IMO it has an obscure syntax and is hard to use but
> I'd say it's still better than manually modifying the symlinks.
>
I think you'll find that all Linux distros (and the remaining Unixen) 
have a similar tool, though the name may differ between distros: Fedora 
calls the tool 'alternatives'.

As always, the apropos tool is your friend here: "apropos alternate" 
finds 'alternatives' on my laptop, a Fedora system, and 
'update_alternatives' on my RPi.


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

[toc] | [prev] | [next] | [standalone]


#26026

FromChris Green <cl@isbd.net>
Date2021-01-22 10:25 +0000
Message-ID<aplqdh-bnra.ln1@esprimo.zbmc.eu>
In reply to#26023
Anssi Saari <as@sci.fi> wrote:
> druck <news@druck.org.uk> writes:
> 
> >> Huh. Thanks for checking. Perhaps I am the "victim" of an automated
> >> switch from mawk to gawk after installing it as a dependency from
> >> other things I always install.
> >
> > I think that is the case, as I don't recall ever deliberately
> > installing gawk on those two machine.
> 
> Could be. I have two Pis, one is running Raspbian 8 and
> /etc/alternatives/awk points to mawk. The other is running Raspbian 10
> and /etc/alternatives/awk points to gawk. I don't think I have installed
> gawk on the latter but I don't really remember for sure.
> 
> By the way, since I haven't seen this mentioned, Debian provides a tool
> to manage those symlinks in /etc/alternatives, it's called
> update-alternatives. IMO it has an obscure syntax and is hard to use but
> I'd say it's still better than manually modifying the symlinks.

Yes, update-alternatives is an exercise in being as arcane as possible
I'm sure!  :-)

I think, in general, if you explicitly install gawk or mawk then they
will set themselves as the preferred (by update-alternatives) version
of awk.

-- 
Chris Green
ยท

[toc] | [prev] | [next] | [standalone]


#25971

FromKees Nuyt <k.nuyt@nospam.demon.nl>
Date2021-01-19 17:03 +0100
Message-ID<1g0e0ghaq06r2mcbiud967qndlm1l604s0@dim53.demon.nl>
In reply to#25968
On Tue, 19 Jan 2021 13:46:18 +0000, Pancho
<Pancho.Dontmaileme@outlook.com> wrote:

> Yeah that is kind of the point, I'm a mediocre old programmer, I don't 
> want to know everything about everything. What I want is an easy life. I 
> want a basic technique to work, reliably, environment agnostically as 
> possible.
>
> I think this clarifies in my mind why I wouldn't ever use this technique 
> to observe events in practice. It is too fragile.

FWIW:
I use gawk to follow logfiles, and the fflush() function to
flush the output buffers.


Snippet of Bash script :
tail -f -n $TLINES $LOGFILE \
 | gawk -f $SCRIPT.awk \
 | sqlite3 $DATABASE

pseudocode of $SCRIPT.awk :
 process every input line
 console output to "/dev/stderr"
	-> realtime filtered, reformatted view
 SQL statements to stdout
	-> statistics
 After processing every input line:
	fflush()

-- 
Regards,
Kees Nuyt

[toc] | [prev] | [next] | [standalone]


#25941

FromA. Dumas <alexandre@dumas.fr.invalid>
Date2021-01-17 01:09 +0000
Message-ID<60038e51$0$11310$e4fe514c@news.xs4all.nl>
In reply to#25938
Martin Gregorie <martin@mydomain.invalid> wrote:
> sudo echo "Another message" 2>&1 | logsave /var/log/messages -

sudo echo ... | ... doesn't work the way you probably intend. The sudo only
applies to echo, not the second command. You could use instead: sudo
logsave -a logfile command_with_parameters &>/dev/null

[toc] | [prev] | [next] | [standalone]


#25944

FromChris Elvidge <chris@mshome.net>
Date2021-01-17 11:48 +0000
Message-ID<ru1879$9oo$1@dont-email.me>
In reply to#25935
On 16/01/2021 05:53 pm, Martin Gregorie wrote:
> In fact I couldn't get the following to work at all:
> 
> sudo journalctl -f | awk '{ print $0 }'

Why would you use awk at all here? You're just (re)printing the input line.
BTW the above works here - LMDE4, GNU awk 4.2

-- 
Chris Elvidge
England

[toc] | [prev] | [next] | [standalone]


#25946

FromPancho <Pancho.Dontmaileme@outlook.com>
Date2021-01-17 12:11 +0000
Message-ID<ru19gr$h31$1@dont-email.me>
In reply to#25944
On 17/01/2021 11:48, Chris Elvidge wrote:
> On 16/01/2021 05:53 pm, Martin Gregorie wrote:
>> In fact I couldn't get the following to work at all:
>>
>> sudo journalctl -f | awk '{ print $0 }'
> 
> Why would you use awk at all here? You're just (re)printing the input line.
> BTW the above works here - LMDE4, GNU awk 4.2
> 

If you had read the thread, you would have seen that I was testing 
potential buffering, i.e. awk's timely response to input from the 
journalctl -f.

[toc] | [prev] | [next] | [standalone]


#25949

FromMartin Gregorie <martin@mydomain.invalid>
Date2021-01-17 14:43 +0000
Message-ID<ru1ien$qub$2@dont-email.me>
In reply to#25944
On Sun, 17 Jan 2021 11:48:55 +0000, Chris Elvidge wrote:

> On 16/01/2021 05:53 pm, Martin Gregorie wrote:
>> In fact I couldn't get the following to work at all:
>> 
>> sudo journalctl -f | awk '{ print $0 }'
> 
> Why would you use awk at all here? You're just (re)printing the input
> line.

I think that was just simple proof-of-concept test code to check that awk 
was reading the journalctl output stream. Quite reasonable if you've 
never user awk before.

> BTW the above works here - LMDE4, GNU awk 4.2
>
I don't recall needing the '--' in the "awk -- 'short awk prog'" command 
before, but there seems to have been a bit of rationalisation going on. I 
notice that now (Fedora 32) /usr/bin/awk is now a symlink pointing to /
usr/bin/gawk but don't know when that happened or which other distros do 
the same.


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

[toc] | [prev] | [next] | [standalone]


#25945

FromChris Elvidge <chris@mshome.net>
Date2021-01-17 11:52 +0000
Message-ID<ru18el$au2$1@dont-email.me>
In reply to#25935
On 16/01/2021 05:53 pm, Martin Gregorie wrote:
> In fact I couldn't get the following to work at all:
> 
> sudo journalctl -f | awk '{ print $0 }'

Sorry Martin. This shouldn't have been attributed to you; it was Pancho 
that wrote it. Selecting some message text in Thunderbird seems to 
confuse it; however I should remember to check attributions before sending.

-- 
Chris Elvidge
England

[toc] | [prev] | [next] | [standalone]


#25947

FromAndy Burns <usenet@andyburns.uk>
Date2021-01-17 13:53 +0000
Message-ID<i6itq4Fshp8U1@mid.individual.net>
In reply to#25945
Chris Elvidge wrote:

> Selecting some message text in Thunderbird seems to confuse it

It doesn't confuse it as such, but it only quotes the selected text, 
however it still adds an attribution for the author of the message 
you're replying to.

[toc] | [prev] | [standalone]


Page 5 of 5 — ← Prev page 1 2 3 4 [5]

Back to top | Article view | comp.sys.raspberry-pi


csiph-web