problem reading /proc/net/route on amd64
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-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' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O0 -ggdb -pipe uname output: Linux olive 2.6.11-gentoo-r4 #4 Mon May 16 10:19:39 EDT 2005 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 3.0 Patch Level: 16 Release Status: release Description: bash stops after the first line when using bash internals to read /proc/net/route on amd64. I've verified this on both Gentoo and Debian, both running bash-3.0-16. I've also tested with the same version of bash on alpha, ia64 and x86 and verified that it doesn't happen there. Repeat-By: $ echo "$(http://lists.gnu.org/mailman/listinfo/bug-bash
problem with $(
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-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' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O0 -ggdb -pipe uname output: Linux olive 2.6.11-gentoo-r4 #4 Mon May 16 10:19:39 EDT 2005 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 3.0 Patch Level: 16 Release Status: release Description: Using bash internals to read /proc/net/route on amd64 stops reading at the end of the first line. Tested on bash-3.0-16 on Gentoo and Debian. Also tested on alpha, ia64 and x86, none of which exhibit the problem. Copying the pseudo-file from /proc to another location works as expected. It's only when reading directly from /proc that the problem appears. Repeat-By: $ echo "$(http://lists.gnu.org/mailman/listinfo/bug-bash
lack of documentation on use of $TMPDIR
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It would be nice if the Shell Variables section of documentation mentions that $TMPDIR can affect where temporary files are created, and situations where that happens (such as when processing here-docs). Furthermore, the FILES section should mention that when TMPDIR is not defined, the tmpdir search proceeds through '/tmp', '/var/tmp', '/usr/tmp', and '.', for the first directory writable by the current user. Bash 3.0 does not document this anywhere, so I had to go digging through the source code to find it (see lib/sh/tmpfile.c). - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC2Dnq84KuGfSFAYARAokyAJwLD/YAnIISEs0668FDwMYMIdfhfgCggD9h Uo9H6dCdhOtpUlJtAysWB70= =J6G9 -END PGP SIGNATURE- ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: problem with $(
Aron Griffis wrote: > Bash Version: 3.0 > Patch Level: 16 > Release Status: release > > Description: > Using bash internals to read /proc/net/route on amd64 stops > reading at the end of the first line. Tested on bash-3.0-16 > on Gentoo and Debian. Also tested on alpha, ia64 and x86, > none of which exhibit the problem. I don't have any amd64 systems to test this on, so I'll have to rely on others' debugging. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live...Laugh...Love Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
bash feature request: pushd -v, popd -v
Hi, I love bash, and I've been using it for a number of years. Recently, I worked with software engineers who used tcsh primarily, where I grew to appreciate one feature of tcsh: the ability to use the commands pushd -v, and popd -v. As you know, when the bash pushd and popd commands are successful, they print the directory stack. In tcsh, one can additionally issue the command pushd -v, which is like the bash commands pushd followed by dirs -v. This feature appears not to be available in bash. tcsh> pushd -v /tmp 0 /tmp 1 / I find this to be a good feature of tcsh because I find that the output of dirs without the -v argument can get cluttered, especially when there are many directories on the stack. So, I'd like to request that this feature be added to bash, if such an addition is feasible. Obviously I'm going to keep using bash regardless of whether this request is feasible. :) Thanks, Ben Horowitz P.S. Here is version information - it is possible that this feature has been added to a newer version of bash than I have: $ bash --version GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu) Copyright (C) 2002 Free Software Foundation, Inc. $ uname --all Linux [machine name omitted] 2.6.12.1 #2 SMP Thu Jun 23 14:01:21 PDT 2005 i686 GNU/Linux $ gcc --version gcc (GCC) 3.4.0 ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: bash feature request: pushd -v, popd -v
Ben Horowitz wrote: > Hi, > > I love bash, and I've been using it for a number of years. Recently, > I worked with software engineers who used tcsh primarily, where I grew > to appreciate one feature of tcsh: the ability to use the commands > pushd -v, and popd -v. > > As you know, when the bash pushd and popd commands are successful, > they print the directory stack. In tcsh, one can additionally issue > the command pushd -v, which is like the bash commands pushd followed > by dirs -v. This feature appears not to be available in bash. > > tcsh> pushd -v /tmp > 0 /tmp > 1 / > > I find this to be a good feature of tcsh because I find that the > output of dirs without the -v argument can get cluttered, especially > when there are many directories on the stack. Here's a first cut. Salt to taste (yes, you should use getopts): pushd() { local es case "$1" in -v) vflag=y; shift ;; esac builtin pushd "$@" es=$? [ -n "$vflag" ] && dirs -v return $es } -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live...Laugh...Love Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: bash feature request: pushd -v, popd -v
On 7/15/05, Ben Horowitz <[EMAIL PROTECTED]> wrote: > I grew to appreciate one feature of tcsh: the ability to use > the commands pushd -v, and popd -v. > > As you know, when the bash pushd and popd commands are successful, > they print the directory stack. In tcsh, one can additionally issue > the command pushd -v, which is like the bash commands pushd followed > by dirs -v. This feature appears not to be available in bash. > > tcsh> pushd -v /tmp > 0 /tmp > 1 / Does this do the trick? pushd () { local verbose=0; if [ "$1" = "-v" ]; then verbose=1; shift; fi; builtin pushd "$@"; if [ $verbose -eq 1 ]; then for w in [EMAIL PROTECTED]; do echo "$w${DIRSTACK[$w]}"; done; fi } Barely tested (and with bash 3.0 at that), but it seems to do what you want. popd would be very similar, of course. Dave ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash