[EMAIL PROTECTED] wrote:
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_VEND
Paul Jarc wrote:
mwoehlke <[EMAIL PROTECTED]> wrote:
I thought the syntax was only two '<'s?
"<<" gives you a here-document. "<<<" gives you a here-string. Check
the man page for details.
Ah, ok, never noticed that feature before. Huh
Poor Yorick wrote:
The following line does not perform the "echo" command.
: ${FAKEVAR?} || echo hello
This seems inconsistent, since the return status is set to one,
not to mention that the null command is documented to return a
zero exit code. It would be a convenient and concise syntax for
Perry Smith wrote:
This may be a dup but the subject pretty much says it all. Compiled
bash-3.1 fresh out of the box with just a configure command. The only
error was this:
ld: 0711-317 ERROR: Undefined symbol: .isnan
I fixed it by adding -lm to the LOCAL_LIBS in the Makefile. Not sure if
John Wenker wrote:
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' -DSHELL -DHAVE_CONFIG_H
Paul Jarc wrote:
John Wenker <[EMAIL PROTECTED]> wrote:
The following construct _always_ evaluates true, regardless of
whether the file exists or not.
if [ ! -a file ]; then
echo "This line always prints no matter what."
else
echo "This line
Paul Jarc wrote:
mwoehlke <[EMAIL PROTECTED]> wrote:
I *know* '! [ -a file ]' is not portable. I tried to use it in some
script, somewhere, at some time, and it was sometimes treated as history
expansion.
Quoting the "!" would take care of that particular problem
Nico Schottelius wrote:
Bash needs -e to react on escape characters.
No other shell (afaik) does that (confirmed with dash, ksh and zsh),
nor does posix specify that behaviour:
http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html
Not really a bug, but this seems to be the only bash list gname knows
about, so...
I am trying to figure out how to run a command and pipe the output
through tee, and then check the status of the original command. Normally
I am a very competent shell programmer, but this one has me stumped!
Paul Jarc wrote:
mwoehlke <[EMAIL PROTECTED]> wrote:
I am trying to figure out how to run a command and pipe the output
through tee, and then check the status of the original command.
This uses a bash-specific feature:
cmd > >(tee file); status=$?
Thanks Paul and Stephen for th
Yang wrote:
On my FC5 box, when I try certain things in bash 3.1.7(1)-release
involving redirection, such as the following, bash crashes
(immediately exits):
{ echo a >&3 ; } 3> >( echo b )
That toasts "3.00.15(1)-release" (FC4 IIRC), but not 3.1.17. I would
apply patches 8-17 and try again.
Stephane Chazelas wrote:
On Thu, Oct 05, 2006 at 12:23:41AM +0200, Reuti wrote:
[...]
Curly braces expansion only works with at least one comma
(,). This also works, if the appears at least once
inside some apostrophes and has no function.
Repeat-By:
[EMAIL PROTECTED]:
Andreas Schwab wrote:
mwoehlke <[EMAIL PROTECTED]> writes:
...but doesn't that mean that '{"x,x"}' should expand as '{x,x}'
It does.
Huh?
$ echo {"x,x"} # expected result: '{x,x}'
x,x
$ echo $BASH_VERSION
3.1.17(3)-releas
Andreas Schwab wrote:
mwoehlke <[EMAIL PROTECTED]> writes:
Andreas Schwab wrote:
mwoehlke <[EMAIL PROTECTED]> writes:
...but doesn't that mean that '{"x,x"}' should expand as '{x,x}'
It does.
Huh?
In the forthcoming 3.2 release anyway, so t
Anyone have any clever, VERY reliable tricks for detecting if the
current shell is bash? The obvious way is '[ -n "$BASH" ]', but in the
interest of catching idiots that set BASH to get around such a check, I
came up with:
[ "`BASH_SUBSHELL=975 ; ( echo $BASH_SUBSHELL )`" -eq 976 ]
(975 is of
Dave Rutherford wrote:
On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote:
Anyone have any clever, VERY reliable tricks for detecting if the
current shell is bash?
Well, I don't know if it's clever, but how about:
Oh, my... Where do I *start*?
$ if [ "${SHELL//*/bash}&q
Stephane Chazelas wrote:
On Tue, Oct 10, 2006 at 05:12:07PM -0500, mwoehlke wrote:
Dave Rutherford wrote:
On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote:
Anyone have any clever, VERY reliable tricks for detecting if the
current shell is bash?
Well, I don't know if it's cleve
Dave Rutherford wrote:
On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote:
Completely non-workable. That only works if the bash I want is in
/bin/bash
Well, no. It works as long as the last thing in the path
is 'bash'. It could be /usr/bin/bash, /home/bin/bash,
or yes, /bin/ba
Stephane Chazelas wrote:
On Tue, Oct 10, 2006 at 06:14:22PM -0500, mwoehlke wrote:
[...]
$ zsh -c 'echo "`/dev/null 2>&1`"' bash
bash: /dev/null: Permission denied
$ zsh
$ ARGV0=bash ash -c 'echo "`/dev/null 2>&1`"; echo $BASH'
bash: /d
Paul Jarc wrote:
mwoehlke <[EMAIL PROTECTED]> wrote:
And since when does '#! /bin/bash' mean "use whatever 'bash' you
find in $PATH"? Silly me, I thought it meant "use '/bin/bash'".
Dave did say "hash-bang", but he didn
(Sorry for the double-post, I saw your CC and replied privately before I
noticed that you did in fact send to the list also.)
Ramprasad wrote:
On Wed, 2006-10-11 at 02:38, mwoehlke wrote:
Anyone have any clever, VERY reliable tricks for detecting if the
current shell is bash?
Hope, i
Gabor Mayer wrote:
GNU bash, version 3.1.17(1)-release (x86_64-pc-linux-gnu)
# builtin time
bash: builtin: time: not a shell builtin
$ type time
time is a shell keyword
I don't think this is a bug, even though it feels like one. :-) 'time'
is a keyword like 'if', 'for', 'do', 'function', etc.
22 matches
Mail list logo