Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Charles Curley
On Tue, 24 Dec 2024 15:45:31 +0100 (CET) Roger Price wrote: > File /proc/mdstat indicates a dying RAID device with an output > section such as > > md3 : active raid1 sdg6[0] > 871885632 blocks super 1.0 [2/1] [U_] > bitmap: 4/7 pages [16KB], 65536KB chunk > > Note the [U-]. Th

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Roger Price
On Tue, 24 Dec 2024, Greg Wooledge wrote: On Tue, Dec 24, 2024 at 15:45:31 +0100, Roger Price wrote: md3 : active raid1 sdg6[0] 871885632 blocks super 1.0 [2/1] [U_] bitmap: 4/7 pages [16KB], 65536KB chunk Note the [U-]. There isn't any [U-] in that output. There is [U_].

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Andy Smith
Hi, On Tue, Dec 24, 2024 at 03:45:31PM +0100, Roger Price wrote: > I would like to scan /proc/mdstat and set a flag if [U-], [-U] or [--] > occur. Others have pointed out your '-' vs '_' confusion. But are you sure you wouldn't rather just rely on the "mdadm --monitor" command that emails you whe

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Nicolas George
Roberto C. Sánchez (12024-12-24): > I think that '==' is the wrong tool. string1 == string2 string1 = string2 True if the strings are equal. = should be used with the test command for POSIX conformance. When used with the [[ command,

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Greg Wooledge
On Tue, Dec 24, 2024 at 10:37:29 -0500, Roberto C. Sánchez wrote: > I think that '==' is the wrong tool. That is testing for string > equality, whilst you are looking for a partial match. This is what I was > able to get working after hacking on it for a minute or two: > > #! /bin/bash -u > set -x

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Roberto C . Sánchez
Hi Roger, On Tue, Dec 24, 2024 at 03:45:31PM +0100, Roger Price wrote: > File /proc/mdstat indicates a dying RAID device with an output section such > as > > md3 : active raid1 sdg6[0] >871885632 blocks super 1.0 [2/1] [U_] >bitmap: 4/7 pages [16KB], 65536KB chunk > > Note the [

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Stefan Monnier
> File /proc/mdstat indicates a dying RAID device with an output section such > as > > md3 : active raid1 sdg6[0] >871885632 blocks super 1.0 [2/1] [U_] >bitmap: 4/7 pages [16KB], 65536KB chunk > > Note the [U-]. I can't see a "[U-]", only a "[U_]" Stefan

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Greg Wooledge
On Tue, Dec 24, 2024 at 15:45:31 +0100, Roger Price wrote: > File /proc/mdstat indicates a dying RAID device with an output section such > as > > md3 : active raid1 sdg6[0] >871885632 blocks super 1.0 [2/1] [U_] >bitmap: 4/7 pages [16KB], 65536KB chunk > > Note the [U-]. There i

Re: Bash expression to detect dying RAID devices

2024-12-24 Thread Nicolas George
Roger Price (12024-12-24): > File /proc/mdstat indicates a dying RAID device with an output section such > as Maybe try to find a more script-friendly source for that information in /sys/class/block/md127/md/? Regards, -- Nicolas George

Re: BASH reference for those who are "learning by doing"?

2024-09-10 Thread Lee
On Tue, Sep 10, 2024 at 5:05 AM Anssi Saari wrote: > > Karl Vogel writes: > > > Have you tried some different fonts? My eyesight is poor, and a good > > font made all the difference. > > > > https://bezoar.org/posts/2023/0214/font-screenshots/ > > Fonts on what? I mostly can't control fonts on doc

Re: BASH reference for those who are "learning by doing"?

2024-09-10 Thread George at Clug
On Tuesday, 10-09-2024 at 18:59 Anssi Saari wrote: > George at Clug writes: > > > Have you tried 100 Hz or greater monitors? All my monitors are 60Hz. I > > wonder if these help with prolonged computer use? > > In my home setup one monitor does 75 Hz and the other 144 but I can't > see much

Re: BASH reference for those who are "learning by doing"?

2024-09-10 Thread Anssi Saari
Karl Vogel writes: > Have you tried some different fonts? My eyesight is poor, and a good > font made all the difference. > > https://bezoar.org/posts/2023/0214/font-screenshots/ Fonts on what? I mostly can't control fonts on documents I edit or create, for work at least. A little hard to do on

Re: BASH reference for those who are "learning by doing"?

2024-09-10 Thread Anssi Saari
George at Clug writes: > Have you tried 100 Hz or greater monitors? All my monitors are 60Hz. I > wonder if these help with prolonged computer use? In my home setup one monitor does 75 Hz and the other 144 but I can't see much, if any, difference in clarity compared to 60 Hz. Also I have no id

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread jeremy ardley
On 10/9/24 08:13, Larry Martell wrote: What are these driving glasses? I can no longer drive at night and would love to know about them. They are glasses that are set to focus at long distance, so no good for desk. They correct for astigmatism, so at night instead of point lights such as

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread Larry Martell
On Sun, Sep 8, 2024 at 7:07 PM jeremy ardley wrote: > > > > On 9/9/24 06:23, George at Clug wrote: > > If I required glasses for reading the car's speedometer, then I would > > definitely be using a bifocal pair of glasses. So far I can easily read > > the instrument panel, and since most of the t

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread Charlie Gibbs
On Mon Sep 9 09:07:11 2024 Anssi Saari wrote: > debian-u...@howorth.org.uk writes: > >> As a mere bifocal (well vari-focal) wearer can I suggest a different >> approach. Stop wearing tri-focals or any other variable focus specs >> for reading a computer screen. Tell them to get a [very cheap] p

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread eben
On 9/9/24 05:20, Karl Vogel wrote: On Mon 09 Sep 2024 at 04:47:20 (-0400), Anssi Saari wrote: I've used fixed focus glasses before but I find close range varifocals a huge upgrade. They're extremely useful for monitor work *and also* I can see and read things around me that fall outside the ext

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread Richard Owlett
On 09/09/2024 06:29 AM, Richard Owlett wrote: On 09/08/2024 12:22 PM, Yassine Chaouche wrote: Missed (deleted) the start of the discussion. Not sure if it helps but: I juste made public my toolbox.txt file: https://ychaouche.github.io/toolbox.txt it is meant to be open in emacs, so that you c

Re: Glasses for monitor work (was Re: BASH reference for those who are "learning by doing"?)

2024-09-09 Thread Richard Owlett
On 09/08/2024 12:12 PM, Stephen P. Molnar wrote: On 09/08/2024 12:17 PM, Steve McIntyre wrote: debian-u...@howorth.org.uk wrote: Richard Owlett wrote: [My examples are from my experiments with re-formatting text at https://ebible.org/engkjvcpb/ for comfortable reading by fellow tri-focal we

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread Richard Owlett
On 09/08/2024 12:22 PM, Yassine Chaouche wrote: Missed (deleted) the start of the discussion. Not sure if it helps but: I juste made public my toolbox.txt file: https://ychaouche.github.io/toolbox.txt it is meant to be open in emacs, so that you can use its outliner mode and read only what you

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread George at Clug
On Monday, 09-09-2024 at 19:20 Karl Vogel wrote: > On Mon 09 Sep 2024 at 04:47:20 (-0400), Anssi Saari wrote: > > debian-u...@howorth.org.uk writes: > > > > > As a mere bifocal (well vari-focal) wearer can I suggest a different > > > approach. Stop wearing tri-focals or any other variable focus

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread George at Clug
On Monday, 09-09-2024 at 18:46 Anssi Saari wrote: > debian-u...@howorth.org.uk writes: > > > As a mere bifocal (well vari-focal) wearer can I suggest a different > > approach. Stop wearing tri-focals or any other variable focus specs for > > reading a computer screen. Tell them to get a [very c

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread Karl Vogel
On Mon 09 Sep 2024 at 04:47:20 (-0400), Anssi Saari wrote: > debian-u...@howorth.org.uk writes: > > > As a mere bifocal (well vari-focal) wearer can I suggest a different > > approach. Stop wearing tri-focals or any other variable focus specs for > > reading a computer screen. Tell them to get a [

Re: BASH reference for those who are "learning by doing"?

2024-09-09 Thread Anssi Saari
debian-u...@howorth.org.uk writes: > As a mere bifocal (well vari-focal) wearer can I suggest a different > approach. Stop wearing tri-focals or any other variable focus specs for > reading a computer screen. Tell them to get a [very cheap] pair of > single focus reading glasses made to suit the d

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread jeremy ardley
On 9/9/24 06:23, George at Clug wrote: If I required glasses for reading the car's speedometer, then I would definitely be using a bifocal pair of glasses. So far I can easily read the instrument panel, and since most of the time we spend focusing on the traffic about us, a quick glance now an

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread George at Clug
> single focus reading glasses made to suit the distance their screen is > away. > For any prolonged activity: 1) Like others who have responded, I do the above and recommend the same: "single focus reading glasses made to suit the distance the screen is away". Maintaining that distance is

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread Yassine Chaouche
Missed (deleted) the start of the discussion. Not sure if it helps but: I juste made public my toolbox.txt file: https://ychaouche.github.io/toolbox.txt it is meant to be open in emacs, so that you can use its outliner mode and read only what you're interested in. The relevant part is in "** com

Re: Glasses for monitor work (was Re: BASH reference for those who are "learning by doing"?)

2024-09-08 Thread Stephen P. Molnar
On 09/08/2024 12:17 PM, Steve McIntyre wrote: debian-u...@howorth.org.uk wrote: Richard Owlett wrote: [My examples are from my experiments with re-formatting text at https://ebible.org/engkjvcpb/ for comfortable reading by fellow tri-focal wearing senior citizens As a mere bifocal (well va

Re: Glasses for monitor work (was Re: BASH reference for those who are "learning by doing"?)

2024-09-08 Thread eben
On 9/8/24 12:17, Steve McIntyre wrote: debian-u...@howorth.org.uk wrote: Richard Owlett wrote: [My examples are from my experiments with re-formatting text at https://ebible.org/engkjvcpb/ for comfortable reading by fellow tri-focal wearing senior citizens As a mere bifocal (well vari-focal)

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread ael
On Sun, Sep 08, 2024 at 04:43:20PM +0100, Brad Rogers wrote: > On Sun, 8 Sep 2024 16:25:04 +0100 > debian-u...@howorth.org.uk wrote: > > Hello debian-u...@howorth.org.uk, > > >Tell them to get a [very cheap] pair of single focus reading glasses > >made to suit the distance their screen is away.

Glasses for monitor work (was Re: BASH reference for those who are "learning by doing"?)

2024-09-08 Thread Steve McIntyre
debian-u...@howorth.org.uk wrote: >Richard Owlett wrote: >> [My examples are from my experiments with re-formatting >> text at https://ebible.org/engkjvcpb/ for comfortable reading by >> fellow tri-focal wearing senior citizens > >As a mere bifocal (well vari-focal) wearer can I suggest a differen

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread Brad Rogers
On Sun, 8 Sep 2024 16:25:04 +0100 debian-u...@howorth.org.uk wrote: Hello debian-u...@howorth.org.uk, >Tell them to get a [very cheap] pair of single focus reading glasses >made to suit the distance their screen is away. Exactly what I did. Sure, one /can/ use [bi|tri|vari]focals, but it's a ri

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread debian-user
Richard Owlett wrote: > [My examples are from my experiments with re-formatting > text at https://ebible.org/engkjvcpb/ for comfortable reading by > fellow tri-focal wearing senior citizens As a mere bifocal (well vari-focal) wearer can I suggest a different approach. Stop wearing tri-focals or a

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread Greg Wooledge
On Sun, Sep 08, 2024 at 06:48:30 +0200, Sirius wrote: > Bash has some nifty uses when it comes to variables. > > If you just want to store a file in a variable, > VAR="$( will do it. If you want to do an array instead, use the 'while read line; > do' construct. As others have pointed out, this is

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread Richard Owlett
On 09/07/2024 10:36 PM, Max Nikulin wrote: On 08/09/2024 04:22, Richard Owlett wrote: [My examples are from my experiments with re-formatting text at https://ebible.org/engkjvcpb/ for comfortable reading by fellow tri-focal wearing senior citizens - that I want to minimize the number of HTML

Re: BASH reference for those who are "learning by doing"?

2024-09-08 Thread Richard Owlett
On 09/07/2024 06:51 PM, Greg Wooledge wrote: On Sat, Sep 07, 2024 at 22:00:27 +, Quaeryth wrote: A query like "site:stackoverflow.com bash how to read file into variable" via Google or DuckDuckGo (and maybe other search engines) usually points me in the right direction. Good luck with your e

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread Sirius
On lör, 2024/09/07 at 10:50:36 -0500, Richard Owlett wrote: > This started with be exploring "regular expressions". > I discovered some tutorials that were using Bash in their samples. > One {lost the reference at the moment} was almost a match for a real > world problem I have. Bash has some nift

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread Max Nikulin
On 08/09/2024 04:22, Richard Owlett wrote: [My examples are from my experiments with re-formatting text at https://ebible.org/engkjvcpb/ for comfortable reading by fellow tri-focal wearing senior citizens - that I want to minimize the number of HTML tags & eliminating all CSS usage annoys some

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread Greg Wooledge
On Sat, Sep 07, 2024 at 22:00:27 +, Quaeryth wrote: > A query like "site:stackoverflow.com bash how to read file into variable" via > Google or DuckDuckGo (and maybe other search engines) usually points me in > the right direction. Good luck with your experiments! What kind of file? What kind

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread Quaeryth
>> When I've been in the same position, [...] too (e.g. the wiki you >> referenced). > > Problem is they are pedagogy oriented so to speak. I'm looking for > easier searchability (real word? ;). > >> Unsolicited thoughts: When it comes to regexes (regular expressions) [...] >> useful puzzle to so

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread Richard Owlett
On 09/07/2024 03:46 PM, Quaeryth wrote: On 2024-09-07 11:50, Richard Owlett wrote: This started with be exploring "regular expressions". I discovered some tutorials that were using Bash in their samples. One {lost the reference at the moment} was almost a match for a real world problem I have.

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread Quaeryth
On 2024-09-07 11:50, Richard Owlett wrote: > This started with be exploring "regular expressions". > I discovered some tutorials that were using Bash in their samples. > One {lost the reference at the moment} was almost a match for a real > world problem I have. > > But I've not used Bash in eons a

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread debian-user
Richard Owlett wrote: > This started with be exploring "regular expressions". > I discovered some tutorials that were using Bash in their samples. > One {lost the reference at the moment} was almost a match for a real > world problem I have. > > But I've not used Bash in eons and have forgotten

Re: BASH reference for those who are "learning by doing"?

2024-09-07 Thread David Christensen
On 9/7/24 08:50, Richard Owlett wrote: This started with be exploring "regular expressions". I discovered some tutorials that were using Bash in their samples. One {lost the reference at the moment} was almost a match for a real world problem I have. But I've not used Bash in eons and have for

Re: bash history

2024-08-01 Thread Karl Vogel
This is how I keep a long-term record of bash commands from different sessions: https://www.reddit.com/r/bash/comments/ak9c3r/ HTH -- Karl Vogel I don't speak for anyone but myself Comment: I use a screwdriver a lot Reply: I'm all out of orange juice. Will straight vodka

Re: bash history

2024-07-28 Thread Mike Castle
On Sun, Jul 28, 2024 at 5:16 AM songbird wrote: > not that i would want that, > > but it would be possible for various terminals to save to > their own unique history files based upon terminal pty or > tty or anything else you'd like and to reload those upon > starting up again. Yes. Setting

Re: bash history

2024-07-28 Thread Mike Castle
On Sat, Jul 27, 2024 at 11:23 PM Jeffrey Walton wrote: > On Sun, Jul 28, 2024 at 12:25 AM Mike Castle wrote: > > * I keep history under source control (currently git) and regularly > > (well, for some definition of "regularly"), merge them across machines > > This is an unusual use case (to me).

Re: bash history

2024-07-28 Thread Mike Castle
On Sat, Jul 27, 2024 at 11:04 PM mick.crane wrote: > If I've "su'd" I type "exit". > To close the terminal I click that X in the virtual terminal's top right > hand corner. Depending on settings, that may or may not save that invocation's history. You'll likely want to test to verify that it doe

Re: bash history

2024-07-28 Thread The Wanderer
On 2024-07-28 at 09:29, Yassine Chaouche wrote: > Le 7/28/24 à 12:19, songbird a écrit : > >> to keep my own setup consistent and to not keep certain things in >> history i actually do the opposite of what you want because i want >> certain commands already preloaded in my history for all windows

Re: bash history

2024-07-28 Thread Yassine Chaouche
Le 7/28/24 à 12:19, songbird a écrit : [...] to keep my own setup consistent and to not keep certain things in history i actually do the opposite of what you want because i want certain commands already preloaded in my history for all windows when i start up and then i adjust my environment b

Re: bash history

2024-07-28 Thread songbird
mick.crane wrote: > In debian bookworm, xfce desktop, different virtual terminals have a > different history if same user presses "up key" in different virtual > terminals ? > Is this something that can be changed so history is shared between > virtual terminals? > mick not that i would want

Re: bash history

2024-07-28 Thread Yassine Chaouche
Le 7/28/24 à 05:24, Mike Castle a écrit : On Sat, Jul 27, 2024 at 2:50 PM mick.crane wrote: Is this something that can be changed so history is shared between virtual terminals? Yes. [...] From my .bashrc file, I have the following history related settings: # No limit on running shell

Re: bash history

2024-07-27 Thread mick.crane
On 2024-07-27 23:58, Greg Wooledge wrote: You need to specify *exactly* what you're doing. "exactly" is at mickiwiki.com I can take the ridicule of my coding understanding. Whenever I need to reboot my computer (kernel update or the like), I decide which shells I want to retain history from,

Re: bash history

2024-07-27 Thread Jeffrey Walton
On Sun, Jul 28, 2024 at 12:25 AM Mike Castle wrote: > > On Sat, Jul 27, 2024 at 2:50 PM mick.crane wrote: > > Is this something that can be changed so history is shared between > > virtual terminals? > > [...] > For me, I see up bash with the following features: > * Unbounded history > * History

Re: bash history

2024-07-27 Thread mick.crane
On 2024-07-28 02:12, Greg Wooledge wrote: On Sun, Jul 28, 2024 at 02:01:04 +0100, mick.crane wrote: On 2024-07-27 23:58, Greg Wooledge wrote: > You need to specify *exactly* what you're doing. Sometimes I forget where I was after closing a virtual terminal and it would be handy to see the h

Re: bash history

2024-07-27 Thread Mike Castle
On Sat, Jul 27, 2024 at 2:50 PM mick.crane wrote: > Is this something that can be changed so history is shared between > virtual terminals? Yes. There are all sorts of settings that can control how shells save history. Most shells are capable of doing whatever you want, but the default configur

Re: bash history

2024-07-27 Thread Max Nikulin
On 28/07/2024 08:01, mick.crane wrote: Sometimes I forget where I was after closing a virtual terminal  and it would be handy to see the history in a new terminal, where I "cd'd" to for example. help history less ~/.bash_history

Re: bash history

2024-07-27 Thread Greg Wooledge
On Sun, Jul 28, 2024 at 02:01:04 +0100, mick.crane wrote: > On 2024-07-27 23:58, Greg Wooledge wrote: > > You need to specify *exactly* what you're doing. > Sometimes I forget where I was after closing a virtual terminal and it > would be handy to see the history > in a new terminal, where I "cd'

Re: bash history

2024-07-27 Thread mick.crane
On 2024-07-27 23:58, Greg Wooledge wrote: You need to specify *exactly* what you're doing. My project management skills are non-existent. If I have a script that is working I'll copy to eg. script2 and make changes to that. Sometimes, depending, I'll have similar things in other directories t

Re: bash history

2024-07-27 Thread Vincent Lefevre
On 2024-07-27 22:50:17 +0100, mick.crane wrote: > In debian bookworm, xfce desktop, different virtual terminals have a > different history if same user presses "up key" in different virtual > terminals ? > Is this something that can be changed so history is shared between virtual > terminals? This

Re: bash history

2024-07-27 Thread The Wanderer
On 2024-07-27 at 18:44, mick.crane wrote: > On 2024-07-27 23:08, Greg Wooledge wrote: > >> On Sat, Jul 27, 2024 at 22:50:17 +0100, mick.crane wrote: >> >>> In debian bookworm, xfce desktop, different virtual terminals >>> have a different history if same user presses "up key" in >>> different vi

Re: bash history

2024-07-27 Thread Greg Wooledge
On Sat, Jul 27, 2024 at 23:44:08 +0100, mick.crane wrote: > On 2024-07-27 23:08, Greg Wooledge wrote: > > On Sat, Jul 27, 2024 at 22:50:17 +0100, mick.crane wrote: > > > In debian bookworm, xfce desktop, different virtual terminals have a > > > different history if same user presses "up key" in dif

Re: bash history

2024-07-27 Thread mick.crane
On 2024-07-27 23:08, Greg Wooledge wrote: On Sat, Jul 27, 2024 at 22:50:17 +0100, mick.crane wrote: In debian bookworm, xfce desktop, different virtual terminals have a different history if same user presses "up key" in different virtual terminals ? As your subject says, this is "bash history"

Re: bash history

2024-07-27 Thread Andy Smith
Hi, On Sat, Jul 27, 2024 at 10:50:17PM +0100, mick.crane wrote: > Is this something that can be changed so history is shared between virtual > terminals? You may be interested in "atuin" to aggregate shell history from multiple logins and machines in a searchable interface. It can be self-hosted.

Re: bash history

2024-07-27 Thread Greg Wooledge
On Sat, Jul 27, 2024 at 22:50:17 +0100, mick.crane wrote: > In debian bookworm, xfce desktop, different virtual terminals have a > different history if same user presses "up key" in different virtual > terminals ? As your subject says, this is "bash history". And yes, each instance of bash has it

Re: bash parameter expansion "doesn't like" dots?

2024-03-05 Thread Max Nikulin
On Tue, 5 Mar 2024 at 02:59, Greg Wooledge wrote: We might *guess* that this change was made to make dash more strict about POSIX minimalism (removing extensions), but without documentation we can't do more than guess about motives. The motivation is to avoid difference in behavior when compil

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread David
On Tue, 5 Mar 2024 at 02:59, Greg Wooledge wrote: > On Tue, Mar 05, 2024 at 11:24:11AM +0900, John Crawley wrote: > > ^ worked as a negator in dash character classes up to Bullseye though, so > > something has changed recently. That's what my web searching failed to > > find... > > It looks lik

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread Greg Wooledge
On Tue, Mar 05, 2024 at 11:24:11AM +0900, John Crawley wrote: > ^ worked as a negator in dash character classes up to Bullseye though, so > something has changed recently. That's what my web searching failed to find... It looks like dash doesn't have up-to-date documentation on its changes. There

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread John Crawley
On 05/03/2024 11:36, Max Nikulin wrote: On 05/03/2024 09:02, Greg Wooledge wrote: On Tue, Mar 05, 2024 at 10:49:34AM +0900, John Crawley wrote: I think ^ has been deprecated recently. I failed to find a reference on the web just now though. So, ^ isn't "deprecated".  It's just not portable

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread Max Nikulin
On 05/03/2024 09:02, Greg Wooledge wrote: On Tue, Mar 05, 2024 at 10:49:34AM +0900, John Crawley wrote: I think ^ has been deprecated recently. I failed to find a reference on the web just now though. So, ^ isn't "deprecated". It's just not portable to sh. Running shellcheck on a *sh* scr

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread John Crawley
On 05/03/2024 11:02, Greg Wooledge wrote: On Tue, Mar 05, 2024 at 10:49:34AM +0900, John Crawley wrote: On 05/03/2024 05:27, David Wright wrote: Which shell also matters. The OP appears to be using ^ to negate, but ! has the advantage that it will be understood in bash and dash. I think ^ has

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread Greg Wooledge
On Tue, Mar 05, 2024 at 10:49:34AM +0900, John Crawley wrote: > On 05/03/2024 05:27, David Wright wrote: > > Which shell also matters. The OP appears to be using ^ to negate, > > but ! has the advantage that it will be understood in bash and dash. > > I think ^ has been deprecated recently. I fail

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread John Crawley
On 05/03/2024 05:27, David Wright wrote: Pattern matching in the shell is not the same as in grep: the rules are different, but similar enough to confuse. Grep uses regular expressions, while the shell is usually globs. (I have no experience of shells other than dash and bash though.) Bash can

Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread David Wright
On Mon 04 Mar 2024 at 11:51:29 (+0900), John Crawley wrote: > On 04/03/2024 10:07, David Wright wrote: > > On Sun 03 Mar 2024 at 17:58:53 (-0600), Albretch Mueller wrote: > > > bash doesn't seem to like dots too close to brackets: > > > > > > echo "${_VAR//[^0-9a-zA-Z.,_-]/}" > > > > > > wo

Re: bash parameter expansion "doesn't like" dots?

2024-03-03 Thread John Crawley
On 04/03/2024 10:07, David Wright wrote: On Sun 03 Mar 2024 at 17:58:53 (-0600), Albretch Mueller wrote: bash doesn't seem to like dots too close to brackets: echo "${_VAR//[^0-9a-zA-Z.,_-]/}" works fine. On 3/3/24, Albretch Mueller wrote: _VAR="admissions.piedmont.edu_files?trackid=w

Re: bash parameter expansion "doesn't like" dots?

2024-03-03 Thread David Wright
On Sun 03 Mar 2024 at 17:58:53 (-0600), Albretch Mueller wrote: > bash doesn't seem to like dots too close to brackets: > > echo "${_VAR//[^0-9a-zA-Z.,_-]/}" > > works fine. > > On 3/3/24, Albretch Mueller wrote: > > _VAR="admissions.piedmont.edu_files?trackid=wnm:1980&PDFfiller=what-is-the-

Re: bash parameter expansion "doesn't like" dots?

2024-03-03 Thread Albretch Mueller
bash doesn't seem to like dots too close to brackets: echo "${_VAR//[^0-9a-zA-Z.,_-]/}" works fine. lbrtchx On 3/3/24, Albretch Mueller wrote: > _VAR="admissions.piedmont.edu_files?trackid=wnm:1980&PDFfiller=what-is-the-second-fundamental-theorem-of-calculus(1).pdf" > > echo "${_VAR//[^a-z

Re: bash vs. dash and stdin

2023-11-23 Thread Max Nikulin
On 22/11/2023 19:17, Greg Wooledge wrote: On Wed, Nov 22, 2023 at 07:06:58PM +0700, Max Nikulin wrote: ssh localhost echo remote echo local This is like . ssh grabs all of the stdin (until EOF) and leaves none for bash. Thanks. I expected to

Re: bash vs. dash and stdin

2023-11-22 Thread Nicolas George
Max Nikulin (12023-11-22): > Is there a document that describes shell behavior in respect to stdin in > such cases? The shell did not eat your stdin here, ssh did. Regards, -- Nicolas George

Re: bash vs. dash and stdin

2023-11-22 Thread Greg Wooledge
On Wed, Nov 22, 2023 at 07:06:58PM +0700, Max Nikulin wrote: > Consider a file (ssh.sh) containing a couple of commands: > >ssh localhost echo remote >echo local > > Let's try to run it (assuming key-based authorization) > > bash remote You're trying to use stdin twice at the s

Re: bash $MAIL bug in Bookworm

2023-08-09 Thread tomas
On Wed, Aug 09, 2023 at 04:04:12PM +0100, Alain D D Williams wrote: > I have recently upgraded to Bookworm. > > I have set: > > MAIL=/var/spool/mail/addw > MAILCHECK=60 > > I find that when doing filename expansion, by pressing TAB, that the 'You have > mail' message appears when it

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-10 Thread gene heskett
On 6/9/23 16:01, David Wright wrote: On Fri 09 Jun 2023 at 09:41:23 (-0400), gene heskett wrote: On 6/9/23 06:51, David Wright wrote: On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote: On 6/9/23 00:46, to...@tuxteam.de wrote: On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wro

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-10 Thread gene heskett
On 6/10/23 15:27, Cousin Stanley wrote: Cousin Stanley wrote >> >> $ source .xsessionrc >> On 2023-06-10 10:10, gene heskett wrote: > A neat trick, thanks.   You're welcome. > I've reached that age where I can't remember what, > if anything I had for breakfast most

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-10 Thread Cousin Stanley
Cousin Stanley wrote >> >> $ source .xsessionrc >> On 2023-06-10 10:10, gene heskett wrote: > A neat trick, thanks. You're welcome. > I've reached that age where I can't remember what, > if anything I had for breakfast most mornings. I'm on the way Birthday

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-10 Thread gene heskett
On 6/9/23 19:36, Cousin Stanley wrote: On 2023-06-09 13:00, gene heskett wrote: >> Did you log out and back in, or did you simply start >> a new XFCE4 terminal within an existing session? >> >> The .xsessionrc file is only read >> during X session startup, not when running >> various appl

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-10 Thread Cousin Stanley
>> Cousin Stanley wrote >> I sometimes update the .xsessionrc file for various reasons and then source it to activate the changes without logging out or restarting On 2023-06-10 00:20, David Wright wrote: > Two problems here: > > Other sessions are unaware of the ch

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-10 Thread David Wright
On Fri 09 Jun 2023 at 16:17:50 (-0700), Cousin Stanley wrote: > On 2023-06-09 13:00, gene heskett wrote: > > >> Did you log out and back in, or did you simply start > >> a new XFCE4 terminal within an existing session? > >> > >> The .xsessionrc file is only read > >> during X session startup, not

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread Cousin Stanley
On 2023-06-09 13:00, gene heskett wrote: >> Did you log out and back in, or did you simply start >> a new XFCE4 terminal within an existing session? >> >> The .xsessionrc file is only read >> during X session startup, not when running >> various applications like terminal emulators. >> >> >>> (

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread David Wright
On Fri 09 Jun 2023 at 09:41:23 (-0400), gene heskett wrote: > On 6/9/23 06:51, David Wright wrote: > > On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote: > > > On 6/9/23 00:46, to...@tuxteam.de wrote: > > > > On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote: > > > > > > > > [.

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread gene heskett
On 6/9/23 11:40, Greg Wooledge wrote: On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote: On 6/9/23 09:33, Greg Wooledge wrote: Start with .xsessionrc (the Debian hack) and see if that works. Put a PATH modification in there, and also put something like export GENETEST=hello in a

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread Greg Wooledge
On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote: > On 6/9/23 09:33, Greg Wooledge wrote: > > Start with .xsessionrc (the Debian hack) and see if that works. Put a > > PATH modification in there, and also put something like > > > > export GENETEST=hello > > > in a $HOME/.xsessionrc h

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread gene heskett
On 6/9/23 10:23, to...@tuxteam.de wrote: On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote: On 6/9/23 09:33, Greg Wooledge wrote: On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote: On 6/9/23 07:33, Greg Wooledge wrote: Finally, remember that .xsession is run by /bin/sh,

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread gene heskett
On 6/9/23 10:22, to...@tuxteam.de wrote: On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote: On 6/9/23 09:33, Greg Wooledge wrote: On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote: On 6/9/23 07:33, Greg Wooledge wrote: Finally, remember that .xsession is run by /bin/sh,

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread tomas
On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote: > On 6/9/23 09:33, Greg Wooledge wrote: > > On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote: > > > On 6/9/23 07:33, Greg Wooledge wrote: > > > > Finally, remember that .xsession is run by /bin/sh, not by your login > > > > s

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread gene heskett
On 6/9/23 09:33, Greg Wooledge wrote: On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote: On 6/9/23 07:33, Greg Wooledge wrote: Finally, remember that .xsession is run by /bin/sh, not by your login shell. So, if you've got bash syntax in .profile (or anything it dots in, such as .bas

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread gene heskett
On 6/9/23 06:51, David Wright wrote: On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote: On 6/9/23 00:46, to...@tuxteam.de wrote: On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote: [...] Perhaps I've ben mistaken, but the files in /etc/udev/rules.d are not the same as /lib

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread Greg Wooledge
On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote: > On 6/9/23 07:33, Greg Wooledge wrote: > > Finally, remember that .xsession is run by /bin/sh, not by your login > > shell. So, if you've got bash syntax in .profile (or anything it dots > > in, such as .bashrc), then you cannot safely

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread gene heskett
On 6/9/23 07:33, Greg Wooledge wrote: On Fri, Jun 09, 2023 at 11:51:15AM +0100, David Wright wrote: On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote: Change of subject: I have a mod I make to the $PATH which I've put in .profile, but I've failed to find a place to make it autoexec wh

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread songbird
Greg Wooledge wrote: ... > I must have said this a hundred times, but... it depends on HOW you login. yes! login vs. non-login. the rest left in because it is useful and notable. > The only times .profile is read are when you have a login shell (from a > pure text console login, or an ssh

Re: Bash invocation, was Re: 60-serial.rules, broken

2023-06-09 Thread Greg Wooledge
On Fri, Jun 09, 2023 at 11:51:15AM +0100, David Wright wrote: > On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote: > > Change of subject: > > > > I have a mod I make to the $PATH which I've put in .profile, but I've > > failed to find a place to make it autoexec when I login. And I'm tire

  1   2   3   4   5   6   7   8   9   10   >