Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread Samuel Sieb
On 6/24/25 11:35 PM, ToddAndMargo via users wrote: Bingo!  Thank you! $ x=$(cat abc.txt); echo $x a b c d $ x=$(cat abc.txt); echo "$x" a b c d But your original post had the quotes in the command, so it's a different issue there. -- ___ users m

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread ToddAndMargo via users
On 6/24/25 11:25 PM, Samuel Sieb wrote: On 6/24/25 11:22 PM, ToddAndMargo via users wrote: On 6/24/25 11:12 PM, Samuel Sieb wrote: When I tested it, echo wrote out the text exactly as it was in the original file, so I don't know what's going on with yours.  Are you using bash? On this custo

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread Samuel Sieb
On 6/24/25 11:22 PM, ToddAndMargo via users wrote: On 6/24/25 11:12 PM, Samuel Sieb wrote: When I tested it, echo wrote out the text exactly as it was in the original file, so I don't know what's going on with yours.  Are you using bash? On this customer's machine $ rpm -qa bash bash-5.2.26

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread ToddAndMargo via users
On 6/24/25 11:12 PM, Samuel Sieb wrote: When I tested it, echo wrote out the text exactly as it was in the original file, so I don't know what's going on with yours.  Are you using bash? On this customer's machine $ rpm -qa bash bash-5.2.26-3.fc40.x86_64 I only update him every two years

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread Samuel Sieb
On 6/24/25 11:14 PM, ToddAndMargo via users wrote: On 6/24/25 11:06 PM, Michael D. Setzer II via users wrote: On 24 Jun 2025 at 22:23, ToddAndMargo via users wrote: Date sent:  Tue, 24 Jun 2025 22:23:49 -0700 To: Community support for Fedora users Subject:    Ba

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread ToddAndMargo via users
On 6/24/25 11:06 PM, Michael D. Setzer II via users wrote: On 24 Jun 2025 at 22:23, ToddAndMargo via users wrote: Date sent: Tue, 24 Jun 2025 22:23:49 -0700 To: Community support for Fedora users Subject:Bash: how do I read a file into a variable

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread Samuel Sieb
On 6/24/25 11:10 PM, ToddAndMargo via users wrote: On 6/24/25 10:46 PM, Samuel Sieb wrote: On 6/24/25 10:23 PM, ToddAndMargo via users wrote: Hi All, In my bash script, I want to load a file into a variable and keep the line feeds.     x=$(cat filename) remove all the line feeds. I want $x

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread ToddAndMargo via users
On 6/24/25 10:46 PM, Samuel Sieb wrote: On 6/24/25 10:23 PM, ToddAndMargo via users wrote: Hi All, In my bash script, I want to load a file into a variable and keep the line feeds.     x=$(cat filename) remove all the line feeds. I want $x to be exactly the same as filename. This is where I

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread Michael D. Setzer II via users
On 24 Jun 2025 at 22:23, ToddAndMargo via users wrote: Date sent: Tue, 24 Jun 2025 22:23:49 -0700 To: Community support for Fedora users Subject:Bash: how do I read a file into a variable and keep the line feeds? Send reply to: Community

Re: Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread Samuel Sieb
On 6/24/25 10:23 PM, ToddAndMargo via users wrote: Hi All, In my bash script, I want to load a file into a variable and keep the line feeds.    x=$(cat filename) remove all the line feeds. I want $x to be exactly the same as filename. This is where I would be using this:     echo "$x" | ma

Bash: how do I read a file into a variable and keep the line feeds?

2025-06-24 Thread ToddAndMargo via users
Hi All, In my bash script, I want to load a file into a variable and keep the line feeds. x=$(cat filename) remove all the line feeds. I want $x to be exactly the same as filename. This is where I would be using this: echo "$x" | mailx -s "$Subject" $Cmd $To I get mailed one

Re: invalid or incomplete multibyte or wide character

2025-06-24 Thread Jeffrey Walton
On Tue, Jun 24, 2025 at 11:53 AM Bob Marčan via users wrote: > > [...] > Same environment, upgrade from 41 to 42. > > [~]$ fr > Error in startup script: couldn't read file "/bin/fr": invalid or incomplete > multibyte or wide character > [~]$ file /bin/fr > /bin/fr: symbolic link to ../share/file

Re: invalid or incomplete multibyte or wide character

2025-06-24 Thread Samuel Sieb
On 6/24/25 8:53 AM, Bob Marčan via users wrote: Same environment, upgrade from 41 to 42. [~]$ fr Error in startup script: couldn't read file "/bin/fr": invalid or incomplete multibyte or wide character [~]$ file /bin/fr /bin/fr: symbolic link to ../share/filerunner/fr [~]$ /usr/share/filerunn

Re: invalid or incomplete multibyte or wide character

2025-06-24 Thread Patrick O'Callaghan
On Tue, 2025-06-24 at 15:29 +, Bob Marčan via users wrote: > [~]$ printenv | grep ^LC_ > LC_ADDRESS=C.UTF-8 > LC_NAME=C.UTF-8 > LC_MONETARY=sl_SI.utf-8 > LC_PAPER=sl_SI.utf8 > LC_IDENTIFICATION=C.UTF-8 > LC_TELEPHONE=C.UTF-8 > LC_MESSAGES=C.UTF-8 > LC_MEASUREMENT=sl_SI.utf8 > LC_TIME=POSIX > LC

Re: invalid or incomplete multibyte or wide character

2025-06-24 Thread Bob Marčan via users
[~]$ printenv | grep ^LC_ LC_ADDRESS=C.UTF-8 LC_NAME=C.UTF-8 LC_MONETARY=sl_SI.utf-8 LC_PAPER=sl_SI.utf8 LC_IDENTIFICATION=C.UTF-8 LC_TELEPHONE=C.UTF-8 LC_MESSAGES=C.UTF-8 LC_MEASUREMENT=sl_SI.utf8 LC_TIME=POSIX LC_COLLATE=C.UTF-8 LC_NUMERIC=C.UTF-8 Others are default. -- ___

Re: F42: instructions on setting up hibernate

2025-06-24 Thread Ranjan Maitra via users
On Thu Jun12'25 04:05:09PM, Patrick O'Callaghan wrote: > From: Patrick O'Callaghan > Date: Thu, 12 Jun 2025 16:05:09 +0100 > To: users@lists.fedoraproject.org > Reply-To: Community support for Fedora users > Subject: Re: F42: instructions on setting up hibernate > > On Thu, 2025-06-12 at 09:32 -