Re: Bug in realloc_jobs_list()

2006-02-04 Thread Mike Frysinger
On Friday 03 February 2006 17:50, Jan Niehusmann wrote: > realloc_jobs_list() in bash 3.1 doesn't zero out the unused entries of > the jobs[] array, so bash may segfault later when trying to dereference > these entries. this has already been reported & fixed, download patch #7

Re: problem ? bug ?

2006-02-04 Thread Mike Frysinger
pty strings, so both are considered true, and > the overall result is true. better to read the existing history thus far on the -a subject http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00015.html -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: support /etc/inputrc as a system-wide fallback default ?

2006-02-06 Thread Mike Frysinger
On Saturday 04 February 2006 18:35, Dmitry V. Levin wrote: > On Sat, Feb 04, 2006 at 03:27:19PM -0500, Mike Frysinger wrote: > > we've been using a patch in Gentoo for sometime which adds support > > for /etc/inputrc as a fallback after $INPUTRC and ~/.inputrc ... i >

Re: prompt with \[ \] corrupted by vi history search

2006-02-08 Thread Mike Stroyan
prompt problem does occur with the non-incremental-reverse-search-history (M-p) feature in emacs mode. The patch corrects that symptom as well. I don't see any problem with the incremental search. It doesn't seem to ever try to incorporate the standard prompt. -- Mike S

misc patches for rlfe example code

2006-02-08 Thread Mike Frysinger
ts up LIBS but Makefile.in ignores it (breaks on bsd due to -lutil not being linked in properly) -mike --- readline-5.1/examples/rlfe/Makefile.in +++ readline-5.1/examples/rlfe/Makefile.in @@ -25,7 +25,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ #LDFLAGS = -L$(READLINE_DIR) LDFLAGS = @LDFL

Re: bash for cross-target

2006-02-13 Thread Mike Frysinger
ormation and default to that iirc, the configure test that failed for bash when cross-compiling did not come from bash, but from some autotool code ... but it's been a while since i cross-compiled bash ... what was the error Yuri ? -mike ___ Bu

Re: bash for cross-target

2006-02-13 Thread Mike Frysinger
rrect for cross-target. known issue that is slated to be fixed sometime in the future -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: bash for cross-target

2006-02-13 Thread Mike Frysinger
native headers (from /usr/include), > so signal name translation is incorrect for cross-target. known issue that is slated to be fixed sometime in the future -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: bash-3.0.16 fails to compile on HP-UX 11.11

2006-02-25 Thread Mike Stroyan
e for HPUX and timezone in the 3.1 version of that file. Bash 3.1 builds fine for me on HP-UX 11.11. -- Mike Stroyan [EMAIL PROTECTED] ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Bug with 3.1.10 on FreeBSD

2006-03-05 Thread Mike Jakubik
There seems to be a problem with bash 3.1.10 on FreeBSD as described in this thread. --- http://lists.freebsd.org/pipermail/freebsd-stable/2006-March/023123.html ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-b

[Fwd: Re: bash 3.1.10 breaks configure scripts (was Re: configure scripts ignores parameters)]

2006-03-05 Thread Mike Jakubik
FYI. Original Message Subject: Re: bash 3.1.10 breaks configure scripts (was Re: configure scripts ignores parameters) Date: Sun, 5 Mar 2006 04:01:19 -0500 From: Kris Kennaway <[EMAIL PROTECTED]> To: freebsd-stable@FreeBSD.ORG, [EMAIL PROTECTED], [EMAIL PROTECTED] Re

Re: [Fwd: Re: bash 3.1.10 breaks configure scripts (was Re: configure scripts ignores parameters)]

2006-03-05 Thread Mike Jakubik
Chet Ramey wrote: Mike Jakubik wrote: FYI. This has been a known issue with bison-1.75 for over three years: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=167635;archive=yes http://lists.gnu.org/archive/html/bug-bash/2003-01/msg00061.html http://lists.gnu.org/archive/html/bug-bash

edit-and-execute-command in non-posix vi editing mode fails with default editor

2006-03-10 Thread Mike Stroyan
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA

Re: edit-and-execute-command in non-posix vi editing mode fails with default editor

2006-03-10 Thread Mike Stroyan
On Fri, Mar 10, 2006 at 04:40:00PM -0500, Chet Ramey wrote: > Mike Stroyan wrote: ... > > Remove an extra right parenthesis from bashline.c. > > > > --- bash/bashline.c~2006-01-31 13:30:34.0 -0700 > > +++ bash/bashline.c 2006-03-09 12:32:24.0

Re: Using variables in variables names

2006-03-13 Thread Mike Stroyan
rray2_3" $ set | grep pre_ _='pre_A_two[3]=array2_3' pre_A_one=([1]="array1_1" [2]="array1_1") pre_A_two=([1]="array2_1" [3]="array2_3") pre_one=simple1 pre_two=simple2 $ i=1 $ eval "echo \${pr

exit status when setting local variables

2006-03-27 Thread Mike Frysinger
not sure if this is a bug or feature ... take this little snippet: testit() { local foo=$(false) ; echo $? foo=$(false) ; echo $? } when we run the code, the output is: 0 1 rather than intuitive: 1 1 -mike ___ Bug-bash mailing list

Re: comment

2006-04-09 Thread Mike Stroyan
ment. COMMENT It would be safer to quote a character in the here document delimiter as I did above. That will prevent command expansion of the comment text which might have unintended side-effects. -- Mike Stroyan [EMAIL PROTECTED] ___ Bug-bash mailing

commented quotes in subshells cause syntax errors

2006-04-14 Thread Mike Frysinger
e notice how bash-3.0 keeps wanting more input until i hit ctrl+d ... almost there ! :) -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: commented quotes in subshells cause syntax errors

2006-04-14 Thread Mike Frysinger
On Friday 14 April 2006 22:52, Chet Ramey wrote: > Mike Frysinger wrote: > > not a regression as bash-2.05 / bash-3.0 also barf on this ... i imagine > > someone has already filed this, but i couldnt seem to find it in the > > mailing lists ... > > > > foo=$( #&#

Re: `if $(cmd);' is a positive when there's no output from cmd

2006-04-15 Thread Mike Frysinger
re like: if :; then echo true; fi -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: incorrect handling of invisible characters in prompt string

2006-05-03 Thread Mike Frysinger
g-bash/2006-03/msg5.html seems to work for this test case ... -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

unwanted expansion of variable with nested strings

2006-05-03 Thread Mike Frysinger
argv[1] = BEGIN {foo="a b c"} so if i quote ${foo} like so: $ gawk 'BEGIN {foo="'"${foo}"'"}' it'll work in this case, but then fail if foo contains newlines: foo="a b c" -mike ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: incorrect handling of invisible characters in prompt string

2006-05-03 Thread Mike Frysinger
On Wednesday 03 May 2006 21:42, Mike Frysinger wrote: > the proposed hack: > http://lists.gnu.org/archive/html/bug-bash/2006-03/msg5.html > > seems to work for this test case ... but then seems to break another one: export LC_ALL=C PS1='\[\e[0;33m\]\u\[\e[0m\] ' printf a

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Frysinger
On Thursday 04 May 2006 00:44, Paul Jarc wrote: > Mike Frysinger <[EMAIL PROTECTED]> wrote: > > $ foo="a b c" > > $ gawk 'BEGIN {foo="'${foo}'"}' > > gawk: BEGIN {foo="a > > gawk:^ unterminated string > &g

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Stroyan
A little more bash syntax can quote newlines for awk. $ foo="a b c" $ lf=" " $ gawk 'BEGIN {foo="'"${foo//$lf/\\n}"'"} END {print foo}' /dev/null a b c -- Mike Stroyan [EMAIL PROTECTED] ___

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Frysinger
On Thursday 04 May 2006 11:08, Mike Stroyan wrote: > A little more bash syntax can quote newlines for awk. this is when you start using gawk -v foo="$foo" ... i was using gawk as an example of my variable expansion question, not as a way to figure out how to pass a variable in

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Frysinger
On Thursday 04 May 2006 11:37, Paul Jarc wrote: > Mike Frysinger <[EMAIL PROTECTED]> wrote: > > On Thursday 04 May 2006 00:44, Paul Jarc wrote: > >> What do you mean by "fail"? What do you want to happen in this case? > > > > i meant gawk hates it

configure fails to detect /dev/fd support when running under `su`

2006-05-05 Thread Mike Frysinger
t -z "$bash_cv_dev_fd"; then if test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then bash_cv_dev_fd=whacky else bash_cv_dev_fd=absent fi fi ] or perhaps just this one liner change: exec 3<&0 - if test -r

Re: How to use [[ string =~ regexp ]]?

2006-05-21 Thread Mike Stroyan
art and end of the string. You won't get a match with [[ "string" =~ "^[a-z]$" ]] && echo match But you will get a match with [[ "string" =~ "^[a-z]{6}$" ]] && echo match because it matches the correct number of characters. -- Mike Stro

Re: EOF does not work in echo

2006-05-25 Thread Mike Frysinger
? looks to me like you're evaluating with the wrong tools ... do something like: echo -e "hello \004world" > foo hexedit foo and you'll see that echo is writing out the 0x04 just fine -mike pgpySS5fyLP4z.pgp Description: PGP signature __

Re: EOF does not work in echo

2006-05-25 Thread Mike Frysinger
On Thursday 25 May 2006 20:47, Cai Qian wrote: > The problem is "cat" does not stop reading when see the EOF through the > pipe. how is this a bug in echo ? as pointed out by Chris Johnson, cat is doing the right thing -mike pgpvLPsqPv2AM.pgp Descriptio

exporting variable via variable requires more quotes than normal

2006-06-27 Thread Mike Frysinger
is this a bug or feature ? i never know with bash :) $ echo "HI THERE" > foo $ export f=$( pgpqgaD69pcQP.pgp Description: PGP signature ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: bash 3.1 on Solaris 9

2006-07-13 Thread Mike Frysinger
On Thursday 13 July 2006 14:06, Cheltenham, Christopher J wrote: > What can I do for this error? not that this has anything to do with bash, but you could try installing the library bash is complaining about: > ld.so.1: bash: fatal: libiconv.so.2: open failed: No such file or > direct

incorrect brace expansion when using default values

2006-09-05 Thread Mike Frysinger
this little bit of code doesnt work right: foo() { echo "${1:-a{b,c}}" ; } $ foo a{b,c} $ foo 1 a} tested with bash-3.1.17 -mike pgp0Oi7rbI6UV.pgp Description: PGP signature ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.o

Re: incorrect brace expansion when using default values

2006-09-05 Thread Mike Frysinger
On Tuesday 05 September 2006 19:01, Paul Jarc wrote: > Mike Frysinger <[EMAIL PROTECTED]> wrote: > > this little bit of code doesnt work right: > > foo() { echo "${1:-a{b,c}}" ; } > > Brace expansion happens before parameter expansion (man bash, > EXPANSIO

Re: incorrect brace expansion when using default values

2006-09-06 Thread Mike Frysinger
On Wednesday 06 September 2006 05:04, Andreas Schwab wrote: > [EMAIL PROTECTED] (Paul Jarc) writes: > > Mike Frysinger <[EMAIL PROTECTED]> wrote: > >> this little bit of code doesnt work right: > >> foo() { echo "${1:-a{b,c}}" ; } > > > >

Re: logout from interactive subshell

2006-10-12 Thread Mike Stroyan
l. It is an rlogin question. Type ~. to make rlogin to close the connection. The shells will all exit in response to that. (And you can do the same with ssh, which you should be using instead of rlogin.) -- Mike Stroyan [EMAIL PROTECTED] ___ Bug

[patch] touchup ulimit docs in bash-3.2

2006-10-12 Thread Mike Frysinger
looks like the latest release is missing just 1 last thing in the ulimit documentation with the new rlimit features ... patch attached -mike pgpYzDtWR3t3W.pgp Description: PGP signature add missing docs for -e and -r options --- builtins/ulimit.def +++ builtins/ulimit.def @@ -24,7 +24,7

Re: More Parser Errors in 3.2

2006-10-14 Thread Mike Frysinger
On Friday 13 October 2006 10:56, Jim Gifford wrote: > Been trying to compile swig with the current bash 3.2 have ran into > several issues that I have been able to fix except for this one. this has been reported already: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046.html

Re: bash 3.2 won't run configure script from kdelibs-3.5.5

2006-10-14 Thread Mike Frysinger
On Friday 13 October 2006 11:31, Chris Clayton wrote: > The configure script from kdelibs-3.5.5 can't be run under bash 3.2. It > runs fine under bash 3.1. When I run the script I get: this has been reported already: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046

Re: ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`

2006-10-14 Thread Mike Frysinger
reported already: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046.html -mike pgp3uVV8EBU6k.pgp Description: PGP signature ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Does HIGH_FD_MAX have to be so low?

2006-10-19 Thread Mike Stroyan
file descriptor value was 1023, which would have stayed out of the way of the application's use. Does HIGH_FD_MAX need to be so low? (OK. 255 isn't _REALLY_ low.) Are there negative consequences for using a higher file descriptor when getdtablesize() reports that they are allowed?

Re: Does HIGH_FD_MAX have to be so low?

2006-10-19 Thread Mike Stroyan
On Thu, Oct 19, 2006 at 03:33:37PM -0400, Chet Ramey wrote: > Mike Stroyan wrote: > > > Looking at open_shell_script() in shell.c and move_to_high_fd() in > > general.c, I find that the code will force the use of fildes 255, > > (HIGH_FD_MAX), for reading the shell s

Re: Does HIGH_FD_MAX have to be so low?

2006-10-19 Thread Mike Stroyan
On Thu, Oct 19, 2006 at 04:02:36PM -0400, Chet Ramey wrote: > Mike Stroyan wrote: > > > move_to_high_fd() only avoid open file descriptors if the > > check_new parameter is non-zero. open_shell_script() calls > > move_to_high_fd() with a check_new value of 0. The othe

Re: need explanation ulimit -c for limiting core dumps

2006-10-20 Thread Mike Stroyan
g. Sparse core files can cause trouble for the unwary. They may become non-sparse when copied. That takes up more disk space. -- Mike Stroyan [EMAIL PROTECTED] ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

make -j6 fails in bash-3.2.9

2007-01-01 Thread Mike Stump
make -j6 fails in bash-3.2.9: make[1]: *** No rule to make target `/tmp/bash-3.2/lib/intl/libintl.h', needed by `mkbuiltins.c'. Stop. make: *** [builtins/builtext.h] Error 1 ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/list

Re: "CR" in PS1, doesn't reset "col" to 0

2007-01-24 Thread Mike Stroyan
in "man bash"- \[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt \] end a sequence of non-printing characters -- Mike Stroyan [EMAIL PROTECTED] _

variable assignments and parameter expansion in a single command

2007-03-24 Thread Mike Frysinger
aluated from beginning to end of the command text and that each variable assignment should be expanded individually -mike pgp77b4PCjgvn.pgp Description: PGP signature ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: type -p return status is 0 if alias found

2007-04-04 Thread Mike Frysinger
... my guess is you want -P -mike pgpNXlUeFGo1E.pgp Description: PGP signature ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Bash auto-logout truncates "timed out waiting for input: auto-logout " string

2007-04-13 Thread Mike Frysinger
t waiting for > > input: auto-logout", but instead it reads "timed out waiting f". I do > > not see this issue if I am connected to the board over a faster > > interface such as when I ssh to the board over an ethernet interface. > > You might try adding `fflush(

some more inline assignments / evaluation wrt POSIX

2007-05-18 Thread Mike Frysinger
t;0.net", but in the first statement, $A gets expanded before the variable assignments are processed -mike signature.asc Description: This is a digitally signed message part. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Subnet address

2007-07-20 Thread Mike Frysinger
most likely have to calculate it yourself from the ip address and the subnet mask. -mike signature.asc Description: This is a digitally signed message part. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Subnet address

2007-07-21 Thread Mike Frysinger
On Saturday 21 July 2007, Archimerged Ark Submedes decided to be rude: > On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the question. > > The answer is: funny, you just backed up my statement completely. there is no utility that'll give you the subnet address s

Re: Subnet address

2007-07-23 Thread Mike Frysinger
On Monday 23 July 2007, Matthew Woehlke wrote: > Mike Frysinger wrote: > > On Saturday 21 July 2007, Archimerged Ark Submedes decided to be rude: > >> On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the > >> question. > >> > >>

[patch] cleanup examples/loadables/ a bit

2007-08-06 Thread Mike Frysinger
many of the example loadable modules lack proper includes so the attached patch fixes that -mike signature.asc Description: This is a digitally signed message part. --- bash-3.2/examples/loadables/basename.c +++ bash-3.2/examples/loadables/basename.c @@ -11,6 +11,7 @@ #include #include

Re: [patch] cleanup examples/loadables/ a bit

2007-08-06 Thread Mike Frysinger
On Tuesday 07 August 2007, Mike Frysinger wrote: > many of the example loadable modules lack proper includes so the attached > patch fixes that and as a small followup, @LDFLAGS@ should be added to SHOBJ_LDFLAGS examples/loadables/Makefile ... -mike signature.asc Description: Thi

Re: recalculate LINES and COLUMNS

2007-08-22 Thread Mike Stroyan
bash 3.2.13(1) from ubuntu 7.04. If a urxvt window is maximized or grows large enough to exceed the screen size, then the number of columns changes and $COLUMNS is updated immediately without using any kill command. (If the window is not maximized and remains small enough fit the screen then the n

Re: Readline-5.2 Official Patch 7

2007-08-24 Thread Mike Frysinger
/6 match a bash patch, but not this one ... -mike signature.asc Description: This is a digitally signed message part.

Re: Readline-5.2 Official Patch 7

2007-08-24 Thread Mike Frysinger
On Friday 24 August 2007, Eric Blake wrote: > According to Mike Frysinger on 8/24/2007 3:03 PM: > >> Readline-Release: 5.2 > >> Patch-ID: readline52-007 > > > > is this one going to be released as a bash patch as well ? i see > > readline patches 5

Re: Bash-3.2 Official Patch 20

2007-08-25 Thread Mike Frysinger
a readonly variable appears in the `set` output rather quickly :( -mike signature.asc Description: This is a digitally signed message part.

Re: Bash-3.2 Official Patch 20

2007-08-25 Thread Mike Frysinger
On Saturday 25 August 2007, Mike Frysinger wrote: > On Friday 24 August 2007, Chet Ramey wrote: > > BASH PATCH REPORT > > = > > > > Bash-Release: 3.2 > > Patch-ID: bash32-020 > > >

Re: Bash-3.2 Official Patch 20

2007-08-25 Thread Mike Frysinger
On Saturday 25 August 2007, Chet Ramey wrote: > Mike Frysinger wrote: > >> Bug-Description: > >>> In some cases of error processing, a jump back to the top-level > >>> processing loop from a builtin command would leave the shell in an > >>> inc

Re: Bash-3.2 Official Patch 20

2007-08-25 Thread Mike Frysinger
On Saturday 25 August 2007, Chet Ramey wrote: > Mike Frysinger wrote: > > a side note ... if you change any of BASH_{ARGC,ARGV,LINENO,SOURCE} > > before setting a readonly variable, bash will not spit out the error > > message about the variable being readonly ... >

race condition in build system

2007-08-26 Thread Mike Frysinger
on $(READLINE_LIBRARY) seeing as how in the subdir, it already effectively does according to the object list ... -mike signature.asc Description: This is a digitally signed message part. --- bash-3.2/Makefile.in +++ bash-3.2/Makefile.in @@ -584,7 +584,9 @@ @( { test "${RL_LIBDIR}" = &quo

Re: problems cross-compling bash-3.2

2007-08-27 Thread Mike Frysinger
On Monday 27 August 2007, Christian Boon wrote: > i want to cross compile bash-3.2 for my pxa255 arm processor and its > working although i can't get job control working. cross-compiling bash is known to be broken as it'll mix your host signal defs into the target binary -mike

Re: problems cross-compling bash-3.2

2007-08-27 Thread Mike Frysinger
s-compiling. ah, i missed that ... sorry for the confusion -mike signature.asc Description: This is a digitally signed message part.

Re: problems cross-compling bash-3.2

2007-08-28 Thread Mike Frysinger
> > #include > > #ifdef HAVE_SYS_WAIT_H > > #include > > #endif > > #ifdef HAVE_UNISTD_H > > #include > > #endif > > #include > > Does anybody know what is going wrong or what is missing? nothing is wrong ... as Chet pointed out, look at the autotools snippet to figure out what variable *you* need to set in your environment before executing configure in order to force the check to go the way you want -mike signature.asc Description: This is a digitally signed message part.

Re: Readline history and bash's read -e

2007-09-02 Thread Mike Stroyan
eadline editing. #!/bin/bash history -r script_history set -o vi CMD="" while true do echo "Type something" read -e CMD history -s "$CMD" echo "You typed $CMD" case "$CMD" in stop) break ;; hi

Re: Web urls cannot be accessed from Bash Terminal

2007-09-17 Thread Mike Frysinger
a users mailing list for your distribution rather than filing bug reports. -mike signature.asc Description: This is a digitally signed message part.

using NUL in scripts

2007-09-26 Thread Mike Frysinger
a string, and run a command on it ... but i cant pass it straight as it may be too large, so i need to xargs it ... so i'd do something like: echo ${@/%.moo/.foo$'\000'} | xargs -0 rm -f but this doesnt work since the $'\000' gets stripped -mike signature.asc Description: This is a digitally signed message part.

Re: using NUL in scripts

2007-09-26 Thread Mike Frysinger
On Wednesday 26 September 2007, Mike Frysinger wrote: > or perhaps i want to take an arg list, append a string, and run a command > on it ... but i cant pass it straight as it may be too large, so i need to > xargs it ... so i'd do something like: > echo ${@/%.moo/.foo$'\

Re: Function visibility

2007-10-01 Thread Mike Frysinger
ion-name? that would only help when you executed the script from a shell which sourced the /etc/profile and not if it were run through say a cronjob -mike signature.asc Description: This is a digitally signed message part.

Re: What does the "`" Characteter Do?

2007-10-08 Thread Mike Stroyan
rectly on debian for some locales. I get good output with LANG=C man bash The problem comes from formatting of ` to an abstract 'left quote' value. That can be avoided by quoting it in the manual source as \`. That is an understandable error. Even "man groff" gets that wrong. -- Mike Stroyan <[EMAIL PROTECTED]>

Re: Looping through lines with tabs of file with cat

2007-11-04 Thread Mike Stroyan
do I make it seperate items by newline only? > -- CODE -- > fileIn="blah" > for i in "$(cat $fileIn)" > do > echo $i > echo > done Don't use cat. Read the contents of the file directly with "read". fileIn="blah" while read i do echo "$i" echo done < "$fileIn" -- Mike Stroyan <[EMAIL PROTECTED]>

Re: SIGTTOU handling

2007-11-13 Thread Mike Stroyan
o away. You need to call setpgrp or setsid and then open a pty device to establish the pty as a control terminal. -- Mike Stroyan <[EMAIL PROTECTED]>

Re: find help about 'read' built-in command

2007-11-13 Thread Mike Stroyan
a bit faster than using $(pwd) to execute the pwd builtin. $ s=$SECONDS;for (( i=1;i<1;i++ )) ;do d=$(/bin/pwd);done;echo $(($SECONDS-$s)) 23 $ s=$SECONDS;for (( i=1;i<1;i++ )) ;do d=$(pwd);done;echo $(($SECONDS-$s)) 8 $ s=$SECONDS;for (( i=1;i<1;i++ )) ;do d=$PWD;done;echo

Re: how could I execute a set of script in a directoy tree?

2007-11-13 Thread Mike Stroyan
hen run r /testcase to acutally use the recursive function on /testcase. But the find command is very good at doing this as well. find /testcase -name autotest.sh -perm /111 -execdir bash -c ./autotest.sh \; -- Mike Stroyan <[EMAIL PROTECTED]>

Re: find help about 'read' built-in command

2007-11-13 Thread Mike Stroyan
uestion about directory tree walking. -- Mike Stroyan <[EMAIL PROTECTED]>

Re: Problem with pattern replacing when STRING is an expandable char

2007-12-12 Thread Mike Stroyan
on prevents pathname expansion. $ echo $BASH_VERSION 3.2.25(1)-release $ touch a b c.d e.f $ ls a b c.d e.f $ a=111.1 $ echo ${a//[0-9]/*} c.d e.f $ echo "${a//[0-9]/*}" ***.* $ a=111 $ echo ${a//[0-9]/*} a b c.d e.f $ echo "${a//[0-9]/*}" *** $ -- Mike Stroyan <[EMAIL PROTECTED]>

Re: Please advise on bash programming tactics/strategy

2007-12-13 Thread Mike Stroyan
d do if [[ $int == $interface ]] then echo $rxcnt $txcnt fi done } It would be more modular to use an argument to get_data to pass the interface instead of using the $interface global variable. get_data() { local int d

Re: Nasty PS1 bug

2008-02-06 Thread Mike Frysinger
On Wednesday 06 February 2008, Alexander Renn wrote: > Now I'm having troubles on this version: > GNU bash, version 3.1.17(0)-release (i386-portbld-freebsd6.2) this isnt the latest version available. please retest with the latest. -mike signature.asc Description: This is a digit

Re: Launching Apps to different desktops

2008-02-07 Thread Mike Stroyan
a wrapper application like kstart or devilspie to set the property on the window after it starts to map. That is likely to cause a visible flash as the application starts in the current workspace before it is moved to the requested workspace. I expect you would need to add one of those rather than fi

Re: Dr. Evil typed sleep 666; rm -rf /

2008-02-11 Thread Mike Frysinger
>> > >>With bash, you'll have to kill bash from another shell. > > > > Bug or feature? correct behavior. if you want the other behavior, you should have used: sleep 666 && rm -rf / -mike signature.asc Description: This is a digitally signed message part.

Re: converting an array into a single variable

2008-02-20 Thread Mike Stroyan
.JPG,123456_47.JPG' a=(www/images/*);a=$(IFS=,; echo "${a[*]}";);a="${a//www\/images\/}";echo $a -- Mike Stroyan <[EMAIL PROTECTED]>

[patch] respect LDFLAGS_FOR_BUILD

2008-03-01 Thread Mike Frysinger
the configure script goes through the effort of properly setting up LDFLAGS_FOR_BUILD, but then the Makefile.in turns around and ignores it. instead it incorrectly sets it to $(LDFLAGS). attached patch by Takashi YOSHII should fix things up. -mike signature.asc Description: This is a

Re: Improvement Of Bash To Support Dynamic Command Completion

2008-04-09 Thread Mike Frysinger
f bash shell, i request you to consider > this kind of feature and kindly do some improvement of > the most used unix shell ever. this sort of stuff probably already exists with the bash-completion package. just google for "bash completion". -mike signature.asc Description: This is a digitally signed message part.

Re: finding the index at which two strings differ

2008-05-06 Thread Mike Stroyan
7; -f5 | tr -d , > > > > Any other suggestions? You could use substring expansion to compare characters one by one. #!/bin/bash a=$1 b=$2 if [[ "$a" == "$b" ]] then echo "'$a' and '$b' are the same" else i=0 while [[ "${a:$i:

Re: Bash for OS/2

2008-05-22 Thread Mike Frysinger
or would you rather I had Bash 3.2 working 100% with perfect style > before you want to see it? posting patches would probably be useful to the next random person who wants bash running on OS/2, but if you want to get included, writing proper patches against the latest release+patchset is the w

Re: Add a new internal command to BASH

2008-05-22 Thread Mike Frysinger
0001% of the people who would need to do this. even those small people could most likely leverage the plugins/enable interface rather than having to link statically into bash. but at that point, you're probably splitting hairs, and the questions Bob poses are still just as relevan

Re: Bash for OS/2

2008-05-22 Thread Mike Frysinger
up where you left off after scrapping the latest work from the archives. -mike signature.asc Description: This is a digitally signed message part.

Re: Missing .bash_history Entries

2008-05-24 Thread Mike Stroyan
will not appear when cycling through commands using the arrow keys. That is a documented feature. It only ignores lines starting with space if HISTCONTROL is set to a value including "ignorespace" or "ignoreboth". -- Mike Stroyan <[EMAIL PROTECTED]>

Re: replacing *** with 0 in ascii data file

2008-08-19 Thread Mike Frysinger
*** with the sed. ( am unfamiliar with regexp:-( ) time to learn then huh ? sed -i 's:\*\*\*:0:g' -mike signature.asc Description: This is a digitally signed message part.

feature request: "wait --free-slot" for poor man's parallelization

2008-10-02 Thread Mike Coleman
four running, proceed immediately.) This provides a nice sloppy way of letting me parallelize in a script without having to complicate things. "make -j" and "xargs -P" provide some of this capability, but are a lot more work to set up--I'd really like to have this at my fingertips for interactive stuff. Thanks, Mike

Re: feature request: "wait --free-slot" for poor man's parallelization

2008-10-03 Thread Mike Coleman
On Fri, Oct 3, 2008 at 4:13 AM, Jan Schampera <[EMAIL PROTECTED]> wrote: > Mike Coleman wrote: >> >> Here's a bash feature I'd love to see, but don't have time to >> implement myself: a "--free-slot" flag to 'wait' that will wait unti

Re: feature request: "wait --free-slot" for poor man's parallelization

2008-10-08 Thread Mike Coleman
but not worth the time to install if it's not present on a machine you encounter. Obviously, since I'm not offering to code this up, my opinion carries very little weight. I was hoping someone might decide they'd like the feature, too, and add it. (I suspect that it would actually be a very small change for someone who knows the bash code.) Regards, Mike

using meta-# with large strings results in misbehavior

2008-11-27 Thread Mike Frysinger
e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] which typically expands to: [EMAIL PROTECTED] 0:0 ~ $ running stty size displays 28 114 -mike signature.asc Description: This is a digitally signed message part.

Re: ca - New bash command proposal

2009-02-11 Thread Mike Frysinger
raversed through a symbolic > link, then listing a higher level path using dotdot's do not always show > I am looking for. Below is a trivial example: what's wrong with: ca() { cd "$(readlink -f -- "$@")"; } -mike signature.asc Description: This is a digitally signed message part.

Re: ca - New bash command proposal

2009-02-12 Thread Mike Frysinger
On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote: > Mike Frysinger writes: > > On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: > >> I would like to propose a new command for bash: > >> > >> ca [path] > >> > >> It r

Re: Help: Bash script that show you the last file created?

2009-02-15 Thread Mike Frysinger
me/server/backups/local_backups/" ; find -type d | find . -name > '*.sql' | tac | tail -1; why not just use `ls` and one of its sort options ? the ls man page documents how to sort by creation time -mike signature.asc Description: This is a digitally signed message part.

Re: Help: Bash script that show you the last file created?

2009-02-15 Thread Mike Frysinger
On Sunday 15 February 2009 23:19:28 Jan Schampera wrote: > Mike Frysinger wrote: > >> there is any way to get the last file that created that is fomat is > >> *.sql > > > > why not just use `ls` and one of its sort options ? the ls man page > > documents h

<    1   2   3   4   5   6   >