One IFS non-whitespace is stripped at the end of a word during word splitting

2024-12-08 Thread Yuri Kanivetsky
Hi, I was trying to understand the part of the documentation on word splitting. I realized that without some experiments: https://gist.github.com/x-yuri/6c6b375e7b0721a323960baaedf2a649 I wasn't sure I understood it correctly. And one of the experiments revealed that: $ bash -c 'IFS=

Re: bash doesn't build with gcc 14.x

2024-12-07 Thread Yuri Kanivetsky
On Sat, Dec 7, 2024 at 7:50 PM Chet Ramey wrote: > Since you're building in a docker container, or, more specifically, > without ncurses or any kind of termcap/termlib support, it might be > better to run > > ./configure --disable-readline > > The ancient termcap library in lib/termcap is

Re: bash doesn't build with gcc 14.x

2024-12-06 Thread Yuri Kanivetsky
Meanwhile the workaround is: ./configure CFLAGS=-Wno-implicit-function-declaration && make

bash doesn't build with gcc 14.x

2024-12-06 Thread Yuri Kanivetsky
termcap.a] Error 1 Under alpine:3.20 (gcc 13.2.1) it builds. Regards, Yuri

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
didn't know about BASH_XTRACEFD. In case I'd really need to help users to diagnose their scripts down to the line number I'd use it. Thank you for this very practical and relevant advise. Yuri

The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
t should behave as if these commands were executed in-place. Piping source's output into another command shouldn't change its variables-related behavior. bash-5.2.32 Thanks, Yuri

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
On 11/13/24 15:44, Greg Wooledge wrote: If the "user script" runs quickly enough, then: source userscript >logfile 2>&1 cat logfile This would fail to save the user script's output in case it would execute "exit 1" Yuri

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
Hi !microsuxx, But I need to save the output of the user script into a dedicated log file. This script should run, should save its output into a dedicated log, and then many other commands should use these environment variables. Their logs can't be combined into one. Yuri On 11/13/

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
environment variables that the user script sets for later commands. It doesn't look like any of the above 3 lines do all these 4 requirements. Yuri

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
roblem makes it very inconvenient to implement features around scripts using 'source'. Yuri

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-13 Thread Yuri
ture works. This makes it a very confusing from the user's perspective. Yuri

Re: Having an alias and a function with the same name leads to some sort

2023-01-05 Thread Yuri Kanivetsky
Indeed, it appears I enabled expand_aliases. I'll probably reconsider it.

Having an alias and a function with the same name leads to some sort of recursion

2023-01-02 Thread Yuri Kanivetsky
ot; and print the letters. Regards, Yuri

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-11 Thread Yuri
in/bash is set as user's login shell in 'vipw'. So when this user logs in, it must be invoked as a login shell. Is this correct? Yuri

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-10 Thread Yuri
r examine its name, and act as a login shell with any name. Yuri

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-10 Thread Yuri
On 12/09/17 14:14, Yuri wrote: None of these files are executed when bash is a user's default shell on FreeBSD. No special options were selected. Despite shell.c saying that they should be executed they just aren't. The bug is that bash doesn't handle login situation when it i

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-09 Thread Yuri
haustive detail. Ok, but that's not what my situation is. I am just logging in, using the display manager, when user has /usr/local/bin/bash as the shell in passwd. Why doesn't it execute ~/.profile? Yuri

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-09 Thread Yuri
th is /usr/local/bin/bash as set in passwd db. It doesn't run ~/.profile when I run it manually using this path. Yuri

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-09 Thread Yuri
On 12/09/17 14:59, Bob Proulx wrote: How is the user logging in? Are they logging in with 'ssh' over the network? Or are they logging in through an "xdm" X Display Manager login from a graphical login display? User logs in locally through the display manager. Yuri

~/.profile and ~/.bash_profile aren't executed on login

2017-12-09 Thread Yuri
None of these files are executed when bash is a user's default shell on FreeBSD. No special options were selected. Despite shell.c saying that they should be executed they just aren't. Is this a bug? Yuri

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-06-28 Thread Yuri
On 06/28/2016 02:14, Yuri wrote: Sorry for the delay. Unicode characters without the nls option in bash-4.3.46 are still a problem. Correction: it was a stray patch in FreeBSD port that made HAVE_ICONV undefined. Without it iconv is detected fine without nls. However, I believe this is

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-06-28 Thread Yuri
ort-dynamic: 'linker' input unused configure:8221: $? = 0 configure:8231: result: extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); configure:8243: checking for nl_langinfo and CODESET ---end config.log--- Yuri

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-02-05 Thread Yuri
n the bash context, because bash needs iconv in unrelated to gettext context. Yuri

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-02-03 Thread Yuri
On 01/31/2016 13:41, Yuri wrote: What makes bash print unicode charater ascii values? I found what the problem is: --disable-nls causes HAVE_ICONV being undefined and \u feature not work. This is a bug, because "nls" refers to translations. I usually turn them off because I

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-02-03 Thread Yuri
's got layers upon layers of new features, deprecated features, historical features, features mandated by external "standards", etc. Doesn't sound like a positive thing to me -) Yuri

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-02-03 Thread Yuri
ame escape character is interpreted in two different ways within the same piece of software? Yuri

Re: bash prints numeric values of unicode characters instead of their UTF8 representations

2016-02-03 Thread Yuri
On 01/31/2016 13:41, Yuri wrote: I have this line in ~/.bashrc: PS1=$'\\[\e[0;38;5;202m\\]\u2514\u2023\\[\e[0m\\] ' This link http://unix.stackexchange.com/questions/25903/awesome-symbols-and-characters-in-a-bash-prompt says: "Since bash 4.2, you can use \u followed by 4 hex

bash prints numeric values of unicode characters instead of their UTF8 representations

2016-01-31 Thread Yuri
I have this line in ~/.bashrc: PS1=$'\\[\e[0;38;5;202m\\]\u2514\u2023\\[\e[0m\\] ' My command prompt looks like this: root2514root2023 What makes bash print unicode charater ascii values? bash-4.3.42 FreeBSD-10.3 LANG=en_US.UTF-8 terminal is konsole from kde4 Yuri

Re: bash crashes on command substitution

2015-04-13 Thread Yuri
? Yuri

bash crashes on command substitution

2015-04-13 Thread Yuri
On FreeBSD, I have this command line (1). When I move cursor right after 'tmp', press and , it turns into (2)! What happened? The problem is completely reproducible. bash-4.3.33 Yuri --- (1) begin with this--- [root@yuri /usr/local/etc/rc.d]# [ "$(procstat $(cat /

Re: Commands containing UTF8 characters mess up bash history

2014-03-03 Thread Yuri
is will happen again. Yuri

Re: Commands containing UTF8 characters mess up bash history

2014-03-01 Thread Yuri
To: bug-bash@gnu.org Subject: Commands containing UTF8 characters mess up bash history Configuration Information: Machine: amd64 OS: freebsd9.2 Compiler: clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='amd64' -DCONF_OSTYPE='freebsd9.2' -DCONF_MACHTYPE='amd64-portbld-freebsd9.2' -DC

Re: Commands containing UTF8 characters mess up bash history

2014-03-01 Thread Yuri
On 03/01/2014 14:07, Ryan Cunningham wrote: You could use the command "history -c" to clear the history in case this becomes a real issue. I don't have a real fix. The problem is that it comes back over and over again. Yuri

Commands containing UTF8 characters mess up bash history

2014-03-01 Thread Yuri
am sure bash doesn't treat command, or some part of it, as utf8, and confuses number of characters and number of bytes. bash-4.2.45_1 Yuri

Errors in commands containing UTF8 characters are printed with UTF8 byte expansion

2014-03-01 Thread Yuri
f some international users wish to have UTF8 in their commands, bash should preserve them in all messages. My LANG is en_US.UTF-8, and changing it to ru_RU.UTF-8 doesn't seem to make a difference. Same with LC_ALL. bash-4.2.45_1 Yuri

Re: Why bash doesn't have bug reporting site?

2014-01-13 Thread Yuri
h a patch, and admin can just merge it in with one click, provided there are no conflicts. Yuri

Why bash doesn't have bug reporting site?

2014-01-13 Thread Yuri
I noticed that bash is in absolute minority of projects not using any bug reporting system. Instead, users are directed to this ML to report bugs. It seems like it could have been very beneficial so that people could track the status of the issues. Yuri

Re: Parameter Substitution Causing Memory Leak

2014-01-07 Thread Yuri
un is done like this: HEAPPROFILE=google-profile-pid$$ LD_PRELOAD=/usr/lib/libtcmalloc.so $* Yuri

Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used

2013-12-12 Thread Yuri
ccurs, oddly, this is because the premature deletion of /tmp/sh-np-* If they would keep those fifos in deleted state as much of the time as possible, such leak would be minimal. Yuri

Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used

2013-12-12 Thread Yuri
On 12/11/2013 22:53, Piotr Grzybowski wrote: Yuri: I have verified that under linux 3.2.0, bash-4.2.25, nothing of the sort takes place. tee gets/dev/fd/${somefd}, why it is not supported in bsd kernel i have no idea, but I thought it was. I've even built mplayer and run your script

Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used

2013-12-11 Thread Yuri
On 12/10/2013 23:29, Yuri wrote: Some of my scripts use command substitution, and now I see that there are lots of files like these in /tmp: prw--- 1 yuri wheel 0 Dec 10 13:32 sh-np-1386738492 -rw-r--r-- 1 yuri wheel3278909 Dec 10 14:54 sh-np-1386721176 Besides the

Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used

2013-12-11 Thread Yuri
O _is_ a file, just not a regular file. Yes, it is a special kind of file, but it has a special type S_IFIFO and ls(1) shows it with 'p' type and it also has size=0. What was my point is that this FIFO is sometimes created as a proper FIFO: prw--- 1 yuri wheel 0 Dec 11

Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used

2013-12-11 Thread Yuri
; | do-filter >> my.log) Yuri

bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used

2013-12-10 Thread Yuri
Some of my scripts use command substitution, and now I see that there are lots of files like these in /tmp: prw--- 1 yuri wheel 0 Dec 10 13:32 sh-np-1386738492 -rw-r--r-- 1 yuri wheel3278909 Dec 10 14:54 sh-np-1386721176 Besides the obvious question why they aren&#

Re: Random crashes when setting locale data

2011-11-14 Thread Yuri D'Elia
On Sun, 13 Nov 2011 20:32:07 -0500 Chet Ramey wrote: > > This script fails roughly 3% of the time for me, only when running on a > > loaded system, and then again only when run through "solar". I've tried to > > run bash manually reproducing the *exact* environment by dumping "env" but > > no

Re: Random crashes when setting locale data

2011-11-07 Thread Yuri D'Elia
On Wed, 2 Nov 2011 20:37:35 +0100 Yuri D'Elia wrote: > Core was generated by `/home/ydelia/debug/bin/bash > /home/ydelia/debug/bin/gunzip /home/ydelia/debug/file'. > Program terminated with signal 11, Segmentation fault. > #0 __strlen_sse2 () at ../sysdeps/x86_64/multiar

Random crashes when setting locale data

2011-11-02 Thread Yuri D'Elia
Hi everyone. I've stomped on a bug in either bash or gettext which is very difficult to reproduce and of course one that I cannot ignore. The configuration is as follows: I'm running some calculations using "solar" (a bioinformatical program) which in turns calls "gunzip", which is implemented

RE: bash for cross-target

2006-02-13 Thread Yuri Karlsbrun
been a while > since i > cross-compiled bash ... what was the error Yuri ? > -mike You just cannot execute cross-compiled code on native platform... Also mksignames utility is built using native headers (from /usr/include), so signal name translation is incorrect for cross-target. As I u

RE: bash for cross-target

2006-02-13 Thread Yuri Karlsbrun
;s path (CPPFLAGS="-I"), it didn't help. That's why I wondered, may be I missed something during configuration. Yuri ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

bash for cross-target

2006-02-13 Thread Yuri Karlsbrun
directory where is installed. I have no problem building applications for my target using cross-target tool chain. Do I miss something while configuring bash for cross-target? Thank you, Yuri ___ Bug-bash mailing list Bug-bash@gnu.org http

Output redirection?

2006-01-28 Thread Yuri Karlsbrun
. The logfile is opened. What is the real purpose of the statement above? Thanks, Yuri ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash