[sr #111047] Value of BASHPID changes when inside a here-document

2024-04-04 Thread Richard Waite
Mac OS ___ Follow-up Comments: --- Date: Thu 04 Apr 2024 09:57:30 PM UTC By: Richard Waite I noticed that BASHPID expands to a different PID value compared to the value outside of it.

Parallel make race in 5.1

2021-01-19 Thread Richard Purdie
R}/pipesize.h: +${DEFDIR}/pipesize.h: $(BUILTINS_LIBRARY) @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) pipesize.h ) || exit 1 $(SDIR)/man2html$(EXEEXT): ${SUPPORT_SRC}/man2html.c Cheers, Richard

Bug? Bash manual not indexable by search engines

2019-05-25 Thread Richard Marmorstein
There was discussion on Twitter today (https://twitter.com/PttPrgrmmr/status/1132351142938185728) about how the Bash manual appears to not be indexable by search engines. https://www.gnu.org/software/bash/manual/bashref.html redirects to https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.

Re: Syslog output from bash

2016-08-23 Thread Richard Lohman
That was exactly it. I kept thinking of openlog as opening a pointer to a file. Thanks, all for you insights. On Aug 23, 2016 9:44 AM, "Chet Ramey" wrote: > On 8/22/16 4:10 PM, Richard Lohman wrote: > > Hey all: > > > > In my attempts to log commands from ba

Syslog output from bash

2016-08-22 Thread Richard Lohman
Hey all: In my attempts to log commands from bash via syslog, I've come upon a snag. The output is of the form: Mmm dd HH:MM:SS hostname -bash: command This was obtained by uncommenting the define in config-top.h and changing the call to syslog in bashhist.c as such: syslog(SYSLOG_FACILITY

Logging bash commands to a specific file

2016-06-24 Thread Richard Lohman
Hi, all: I've seen this topic come up a time or two, but the responses don't quit match my situation. ...and, if there's a better place to post, please do feel free to let me know. I need to log all commands entered at the shell for all users on a host (business need, not technical). There is a p

[rvskmbr...@gmail.com: Re: Type-in programs using BASH]

2015-01-26 Thread Richard Stallman
[arg] signal_spec = ...] exec [-cl] [-a name] [command = [argume>  true exit [n]  =                     =           type [-afptP] name [name = ...] export [-fn] [name[=3Dvalue] = ...] or ex>  typeset [-aAfFgilrtux] [-p] = name[=3Dva> false       =                     =         ulimit [-SHabcdefilmnpqrstuvxT] = [lim> fc [-e ename] [-lnr] [first] = [last] o>  umask [-p] [-S] [mode] fg= [job_spec]                 =           unalias [-a] name [name = ...] for NAME [in WORDS ... ] ; do = COMMAND>  unset [-f] [-v] [-n] [name ...] for (( exp1; exp2; exp3 )); do COMMAN>  until = COMMANDS; do COMMANDS; done function name { = COMMANDS ; } or name >  variables - Names and meanings of = so> getopts optstring name = [arg]            wait [-n] [id = ...] hash [-lr] [-p pathname] = [-dt] [name >  while COMMANDS; do COMMANDS; = done help [-dms] [pattern ...] =               { COMMANDS ; = }In= this model, no command is executed until the here identifier is read, = and another shell is spawned to execute all commands. Only one line = at a time can be edited.To enable the spread of this quite = obscure (as far as I know) way to execute BASH, I am attaching the draft = exception I mentioned earlier in this message. (I hereby transfer = copyright over the same to the Free Software = Foundation.)If= one wants to save the typed program so it can be executed again later, = he should use cat <<'EOF' >input.sh | bash instead, = where =E2=80=9Cinput.sh=E2=80=9D is the name of the output = file. (The= file will be overwritten without warning if it already = exists.)<type-in-exception.txt>I thank you = for your efforts, and I encourage you to spread the news about this = to Linux = Format and other GNU/Linux-related magazines, and to individual = programmers, so they can publish Bourne Again Shell programs for = execution in this way.Sincerely,Ryan = Cunningham= - --Apple-Mail=_51A7C042-5A82-40D5-B8FA-5586341517FA-- - --Apple-Mail=_0FFE68EB-40A8-4B26-B362-C6D78F1EEECE-- --- End of forwarded message --- -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call.

bash bug with read -s command

2014-12-21 Thread Richard W. Marsden
steps to produce hide cursor setterm -cursor off call the bash built-in read command as follows: silent, wait 1 second, read 1 character to variable KEY read -s -t 1 -n 1 KEY while the read command is in a loop, control + c is trapped successfully and the cursor is un-hidden setterm

Re: Does declaring an array variable initialize it?

2014-03-20 Thread Richard Tollerton
Chet Ramey writes: > On 3/20/14 12:41 AM, Richard Tollerton wrote: >> >> I suppose that this change in behavior makes array variables more >> consistent with normal variables, but I couldn't find anything in >> CHANGES which obviously relates to this, so I'

Does declaring an array variable initialize it?

2014-03-19 Thread Richard Tollerton
array variables more consistent with normal variables, but I couldn't find anything in CHANGES which obviously relates to this, so I'm not sure if this is a bug or not. Was I always mistaken in figuring that declaring an array also initialized it? -- Richard Tollerton

bug-report/request: allow "set +n" to re-enable commands.

2013-03-22 Thread Richard Neill
i file) Example 3 works if you remove the "-n" and "set +n" parts, though it then emits an annoying complaint about "?php: No such file or directory" Thank you for your consideration, Best wishes, Richard

SIGSEGV on "local -a GROUPS=(...)" in function

2013-02-14 Thread Richard Tollerton
This is probably not a good thing to be doing in the first place (I ran into this before realizing that GROUPS was a special variable): #!/bin/bash crashy () { local -a GROUPS=(a b); } crashy But it probably shouldn't be doing this (tested in bash 4.2.42 on archlinux x86_64, and bash 4.2.10 on ar

Re: compgen is slow for large numbers of options

2012-03-15 Thread Richard Neill
ad it wrong for some time.] Best wishes, Richard Message: 4 Date: Wed, 14 Mar 2012 13:40:36 -0600 From: Bob Proulx To: bug-bash@gnu.org Subject: Re: compgen is slow for large numbers of options Message-ID:<20120314194036.ga12...@hysteria.proulx.com> Content-Type: text/plain; charset=us-asci

Re: compgen is slow for large numbers of options

2012-03-14 Thread Richard Neill
If I increase the upper number by a factor of 10, to 50, these times become, 436 s (yes, really, 7 minutes!) and 0.20 s respectively. This suggests that the algorithm used by compgen is O(n^2) whereas the algorithm used by grep is 0(1). I meant: grep is O(n).

compgen is slow for large numbers of options

2012-03-14 Thread Richard Neill
ample, see: https://bugs.mageia.org/show_bug.cgi?id=373#c8 in which we are using completion on package-management. In this case, the number is 43031. I hope this is helpful. Richard

Re: Error building mkbuiltins on ia64-hp-hpux11.23

2011-04-22 Thread Daniel Richard G.
LDFLAGS) precisely because of flags like this. This is already how Automake does things; the bug comes down to bash's build system not following existing convention. It's not reasonable to have to duplicate CFLAGS in LDFLAGS to avoid the reported link error. --Daniel -- NAME = Daniel

Re: Error building mkbuiltins on ia64-hp-hpux11.23

2011-04-21 Thread Daniel Richard G.
bject. That said, I'm not sure why CFLAGS and CFLAGS_FOR_BUILD should be different, given that this is a "simple" build where build = host = target. --Daniel -- NAME = Daniel Richard G. _\|/_Remember, skunks MAIL = sk...@iskunk.org (/o|o\) _- don't smell bad--- M

Error building mkbuiltins on ia64-hp-hpux11.23

2011-04-20 Thread Daniel Richard G.
library or mismatched ABI for -ldl Fatal error. gmake[1]: *** [mkbuiltins] Error 1 gmake[1]: Leaving directory `/tmp/bash-4.2.build/builtins' gmake: *** [builtins/builtext.h] Error 1 The attached patch (against the 4.2 source) fixes the problem for me. --Daniel -- NAME = D

Re: Encoding oddity

2010-12-10 Thread Richard
ME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= - Thanks! Richard Taubo

Encoding oddity

2010-12-09 Thread Richard
echo "OK 1: $b -- $myfile" fi done # Example 2 myfolder="/Users/myuser/" unset b for b in "$myfolder"*; do if [[ $b == $myfile ]]; then echo "OK 2: $b -- $myfile" fi done - Richard Taubo

Encoding oddity

2010-12-09 Thread Richard
echo "OK 1: $b -- $myfile" fi done # Example 2 myfolder="/Users/myuser/" unset b for b in "$myfolder"*; do if [[ $b == $myfile ]]; then echo "OK 2: $b -- $myfile" fi done - Richard Taubo

Re: filename pattern case-insensitive, but why?

2009-09-23 Thread Richard Leeden
Mike Stroyan wrote: On Tue, Sep 22, 2009 at 02:36:30AM -0700, thahn01 wrote: Hello, If I try something like: $ touch a.c b.c A.c $ ls [a-z]*.c a.c A.c b.c then I get A.c in the output, even if no capital letters are to be found. The "[a-z]" range expression matches characters between a a

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Richard Neill
as: - building up the string in pieces or - EMAIL_BODY=$(echo -e "$EMAIL_BODY") but it's really ugly to do. As I imagine that nobody uses the current $'\n' inside double-quotes, may I request this as a functionality change? Best wishes, Richard

Re: idea: statically-linked "busy-bash"

2009-04-09 Thread Richard Neill
e builtin "grep" functionally identical to /bin/grep. Then I could make a system-wide change, replacing the regular bash shell with the fat-bash, and still have everything work... Richard

idea: statically-linked "busy-bash"

2009-04-08 Thread Richard Neill
Apr 9 07:05:47 BST 2009 In other words, 1E6 invocations of the builtin takes about 11 seconds, while 1E4 invocations of the standalone binary takes 17 seconds. The builtin echo is therefore about 150 times faster. What do you think? Richard

Re: Bash 4.0.0 crash on completion

2009-03-30 Thread Richard Leeden
André Johansen wrote: > > Description: > When using tab-completion, Bash crashes. > I'm using the bash_completion package from > http://www.caliban.org/bash/index.shtml#completion. > > ... > > Repeat-By: > Press tab to get a completion; if Bash enters a programmed completion > (i.e. not a simp

Re: Completion crashes the shell

2009-03-02 Thread Richard Leeden
Chris F.A. Johnson-3 wrote: > > > This completion function worked in previous versions, but fails in > bash4.0 when I press TAB: > > _cpsh() { > COMPREPLY=( ` > cd "$HOME/scripts" || return 3 > printf "%s\n" ${COMP_WORDS[$COMP_CWORD]}*-sh` > ) > COMPR

Re: Problem with function cd in bash 4.0

2009-02-26 Thread Richard Leeden
on Solaris as well. Richard -- View this message in context: http://www.nabble.com/Problem-with-function-cd-in-bash-4.0-tp22171999p0451.html Sent from the Gnu - Bash mailing list archive at Nabble.com.

Re: Problem with function cd in bash 4.0

2009-02-24 Thread Richard Leeden
Chet Ramey wrote: > > I posted a patch for this earlier. Look at > > http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00153.html > > and see if it fixes things for you. > > Chet > Ah yes, that was indeed the problem. Fixed for me as well now. Thanks. -- View this message in context:

Re: Problem with function cd in bash 4.0

2009-02-24 Thread Richard Leeden
0x00027b08 in parse_command () at eval.c:228 #16 0x00027bd0 in read_command () at eval.c:272 #17 0x00027d60 in reader_loop () at eval.c:137 #18 0x00027010 in main (argc=1, argv=0xffbff2e4, env=0xffbff2ec) at shell.c:741 (gdb) Thanks, Richard -- View this message in context: http://www.nabble.com/Problem-with-function-cd-in-bash-4.0-tp22171999p22186602.html Sent from the Gnu - Bash mailing list archive at Nabble.com.

Re: Bash RFE: Goto (especially for jumping while debugging)

2008-09-22 Thread Richard Neill
Bob Proulx wrote: Richard Neill wrote: Dear All, In the future please start a new message for a new thread of discussion. When you reply to old messages from three months ago those of us who actually keep months worth of email see the message threaded with the previous discussion about

Bash RFE: Goto (especially for jumping while debugging)

2008-09-22 Thread Richard Neill
tly to the end". What would be great is a way to "jump into the middle". What do you think? Richard P.S. I am sure lots of people will complain (correctly) that "Goto is considered harmful". I'd agree that, in most cases, it is. But in some cases, such as the

Re: bash: request for a way to return variables to the parent of a subshell

2008-07-22 Thread Richard Neill
Thank you. That's a really neat solution - and it would never have occurred to me. I always think from left to right! Richard Paul Jarc wrote: Richard Neill <[EMAIL PROTECTED]> wrote: the aim is to parse the output of "ffmpeg -formats" to see whether certain codecs

Re: bash: request for a way to return variables to the parent of a subshell

2008-07-22 Thread Richard Neill
there any way to use "read" to iterate over its standard input without creating a subshell? If it's of interest, the actual part of the script I use is below - the aim is to parse the output of "ffmpeg -formats" to see whether certain codecs are

bash: request for a way to return variables to the parent of a subshell

2008-07-22 Thread Richard Neill
main script. Do we need a new keyword to achieve the reverse? Is there any way to make sure that variables defined at [a] can be made to still exist at [b] ? Thanks, Richard

Bash: proposal for >>> operator

2008-07-22 Thread Richard Neill
but lost the pipestatus. 3. The $() construct doesn't let you capture both stderr and stdout into different variables. I know I could do it all with tempfiles, but that somewhat misses the point. Incidentally, if this is useful, it would be nice to support the rather prettier counterpart to the <<< operator, and permit this usage: "$TEXT" >>> grep -o 'hello' What do you think? Regards, Richard

Re: Bash/readline enhancement: wish to pre-set initial value of input text

2008-07-07 Thread Richard Neill
Jan Schampera wrote: > Richard Neill wrote: >> Dear All, >> >> When using read, it would be really neat to be able to pre-fill the form >> with a default (or previous) value. >> >> For example, a script which wants you to enter your name, and thinks >&

Re: Bash substrings: wish for support for negative length (read till n from end)

2008-07-07 Thread Richard Neill
Jan Schampera wrote: > Richard Neill wrote: > >> $ echo ${stringZ:2: -1} #Wish: start at 2, read till >> ERROR#1 before the end. i.e. >> # cde >> >> $ echo ${stringZ: -3: -1}#Wi

Bash substrings: wish for support for negative length (read till n from end)

2008-07-07 Thread Richard Neill
. # de i.e. ${string:x:y} * returns the string, from start position x for y characters. * but, if x is negative, start from the right hand side * if y is negative, print up to (the end - y) Thanks very much, Richard

Bash/readline enhancement: wish to pre-set initial value of input text

2008-07-07 Thread Richard Neill
Dear All, When using read, it would be really neat to be able to pre-fill the form with a default (or previous) value. For example, a script which wants you to enter your name, and thinks that my name is Richard, but that I might want to correct it. Alternatively, this would be useful within a

Re: Bash error message for unterminated heredoc is unhelpful.

2008-06-28 Thread Richard Neill
Chet Ramey wrote: > Richard Neill wrote: >> Dear All, >> >> In some cases, bash gives exceptionally unhelpful error messages, of the >> sort "Unexpected end of file". This is next-to-useless as a debugging >> aid, since there is no way to find out wher

Bash error message for unterminated heredoc is unhelpful.

2008-06-28 Thread Richard Neill
ll scripts with examples. bug-example.sh demonstrates the problem. bug-example2.sh is where bash gets it right. Thanks very much, Richard [EMAIL PROTECTED] ~]$ cat bug-example.sh - #!/bin/bash #This is an example of bash being

Re: Bash arithmetic doesn't give error message on wrap.

2007-04-30 Thread Richard Neill
Bob Proulx wrote: Andreas Schwab wrote: Richard Neill <[EMAIL PROTECTED]> writes: Are you sure this isn't comparable? After all, in both cases, the user has submitted something to which bash cannot give a sensible answer. In the integer-overflow case, bash simply returns the w

Re: Bash arithmetic doesn't give error message on wrap.

2007-04-29 Thread Richard Neill
Bob Proulx wrote: Richard Neill wrote: b)Consistent with other cases, where bash does give warnings. For example: $ X=$((3+078)) bash: 3+078: value too great for base (error token is "078") $ echo $? 1 That is not really a comparable case. The problem there is that the le

Re: Bash arithmetic doesn't give error message on wrap.

2007-04-28 Thread Richard Neill
nts. So, printing an error message would be allowed. The error message would be: a)Most helpful to the user (least surprise) b)Consistent with other cases, where bash does give warnings. For example: $ X=$((3+078)) bash: 3+078: value too great for base (error token is "078") $

Bash arithmetic doesn't give error message on wrap.

2007-04-27 Thread Richard Neill
k for overflow..." but I'd suggest this represents a bug, not a feature. Regards, Richard ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: while read subcommand problem

2007-03-02 Thread Richard van der Leeden
Thank you Paul, Andreas and Kevin. Both the here document solution and the Process substitution solution both work well. I haven't had a good look to see the subtle differences between the two yet. Thank you again. -- View this message in context: http://www.nabble.com/while-read-subcommand-pr

Re: while read subcommand problem

2007-03-02 Thread Richard van der Leeden
Paul Jarc wrote: > > > Can you explain what was unsatisfactory about the alternatives given > in the FAQ, so we have a better idea of what would be acceptable? > > Here's one possibility: > ... | { while ...; do var=...; done; use "$var"; } > > Thanks for the reply, and a possible solution

Open file descriptors

2007-01-18 Thread Richard Ray
Other than lsof is there a way to determine what file descriptors are open? Thanks Richard ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Bash - various feature requests

2006-12-29 Thread Richard Neill
as currently, the user must type in the full string from scratch. Is that clear? Sorry it's hard to explain without a diagram. Richard ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Bash - various feature requests

2006-12-29 Thread Richard Neill
Dear Grzegorz, Thanks for your helpful reply. Grzegorz Adam Hankiewicz wrote: On 2006-12-27, Richard Neill <[EMAIL PROTECTED]> wrote: 1)substr support for a negative length argument. For example, stringZ=abcdef echo ${stringZ:2:-1} #prints cde i.e. ${string:x:y} returns the

Bash - various feature requests

2006-12-29 Thread Richard Neill
the really nice editing features of readline can be used for updating values already stored in variables. This is extremely useful when the value is quite long. --- I hope these thoughts are of some use. I&

Fwd: Re: Bash-3.1.17 gets lost looking for end of string in certa in contexts

2006-05-04 Thread Richard Alfred Gollub
> Just curious: why is it that your version displays 6 within parenthesis, whereas mine displays 2? Shame on me. Decided to stop being lazy and get the answer from the source: man bash... ;) Curiosity satistied: please kindly disregard. Rich

Fwd: Re: Bash-3.1.17 gets lost looking for end of string in certain contexts

2006-05-03 Thread Richard
Have just read the archives... ;) Forwarding to the list accordingly! -- Forwarded Message -- Subject: Re: Bash-3.1.17 gets lost looking for end of string in certain contexts Date: Wednesday 03 May 2006 22:36 From: Richard <[EMAIL PROTECTED]> To: Eric Blake &

Bash-3.1.17 gets lost looking for end of string in certain contexts

2006-05-01 Thread Richard
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/mnt/STG1/share/locale' -DPACKAG

Build problem with Bash-3.0

2005-11-15 Thread James Richard Tyrer
I have Linux built mostly from source. I upgraded to GLibc-2.3.6 and BinUtils-2.16.1. I am currently using GCC-3.4.4 due to some problems with GCC-4.0.2. I have applied all 16 Bash-3.0 patches. Bash builds fine using shared libraries, but when I tried to upgrade my statically linked shell f

bash_profile ?

2005-09-16 Thread Richard Nagle
Are there any good bash_profile links, of showing how to create a good simple bash_profile, that would also include $PATH. Thanks - Richard ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Major problem with Bash 2.05b

2005-09-11 Thread Richard Nagle
stall 3 times with same results. FYI ! Help Please Richard ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash