On Sat, Sep 15, 2012 at 06:12:24PM -0600, Bob Proulx wrote:
I don't know so I will ask. Isn't the problem endemic to glibc? Do
other libc's such as HP-UX or AIX or other have this same issue? I am
out of touch on the details of them these days.
imadev:/tmp/greg$ uname -a
HP-UX imadev
On Mon, Oct 01, 2012 at 11:14:31AM +, eduardo.damasio-da-co...@stfc.ac.uk
wrote:
The command sort -k 3,3 lixo lixo4 does not sort lixo as I was expecting.
For example, by line 385 lixo4 shows:
69.1875 -59.2511 1.00242e-05
70.875 -62.0592 1.00242e-05
145.125 -74.9763 1.00252e-06
On Tue, Oct 02, 2012 at 10:01:43AM -0700, Linda Walsh wrote:
On 9/28/12 9:54 AM, Yuxiang Cao wrote:
test.sh: xmalloc: ../bash/unwind_prot.c:308: cannot allocate 172 bytes
(8359936 bytes allocated)
Why shouldn't bash fail at the point it hits resource exhaustion and return
an error condition
Here's an updated version of a patch I did a few years ago to add loadable
support for bash under HP-UX 10. The previous patch was for bash 4.0.
This one has been updated for bash 4.2. It is fundamentally the same
patch, just with different context and line numbers and stuff, so that
it applies
I've been staring at this for way too long now and I can't figure it out.
imadev:/var/tmp/bash/bash-4.2/examples/loadables$ make
/net/appl/gcc-3.3/bin/gcc -fpic -DHAVE_CONFIG_H -DSHELL -DHPUX -g -O2 -I. -I..
-I../.. -I../../lib -I../../builtins -I../../include -I/var/tmp/bash/bash-4.2
On Fri, Oct 05, 2012 at 05:20:23PM +0200, Andreas Schwab wrote:
Greg Wooledge wool...@eeg.ccf.org writes:
Line 1209 says:
# if (ULLONG_MAX != LLONG_MAX)
LLONG_MAX expands to:
((long long int) (~ (long long int) 0 - ((long long int) ((! ((long long
int) 0 (long long int) -1
On Fri, Oct 12, 2012 at 06:55:28AM -0400, Sergey Fadeev wrote:
Why doesn't it exit the shell?
$ set -e
$ echo $(false)
Because the exit status of echo is 0.
On Sun, Oct 14, 2012 at 05:21:05PM -0700, Linda Walsh wrote:
Steven W. Orr wrote:
Seriously, can we just put a trap on all messages to this list that have
the string 'set -e' in it? Just point the sender to a message that tells
them to not use it.
Seriously -- why not just fix it?
On Mon, Oct 15, 2012 at 10:04:39AM +0800, Tinni wrote:
Thank you so much for your reply and explanation.
So, you're trying to retrieve 3 separate (string?) values from a remote
system.
Yes.
Why not simply prompt the user for the
information on the local system and skip the ssh call
On Mon, Oct 15, 2012 at 04:00:01PM -0400, DJ Mills wrote:
I'm also not entirely sure what you mean by errexit will always be
stored as off.
My interpretation is that he wants to write a portable function for
someone else to use, and that he wants to use errexit while inside it,
and therefore he
On Tue, Oct 16, 2012 at 12:01:56AM +0300, Nikolai Kondrashov wrote:
I'm trying to implement a pair of functions that would save/restore option
state onto/from a stack, so I could modify options temporarily for some
parts
of code. I've worked around this problem already and it is not the
On Mon, Oct 15, 2012 at 08:08:10PM -0400, DJ Mills wrote:
done (set -o)
Huh... that's interesting. I wouldn't have expected it, but it turns
out you don't lose the value of errexit in a process substitution the
way you do in a command substitution.
imadev:~$ bash -c 'set -e; x=$(set +o); grep
On Fri, Nov 09, 2012 at 11:07:28AM -0500, Chet Ramey wrote:
On 11/9/12 4:09 AM, wuya wrote:
2. this format gives user an implication that by executing these
`declare' commands, all those variables got exported, but this is only
partly true as it fails in functions.
That's not quite
On Fri, Nov 09, 2012 at 11:18:24AM -0500, Greg Wooledge wrote:
restore_environment() {
set -o posix
eval $saved_output_of_export_dash_p
set +o posix
}
Err, what I meant was:
save_environment() {
set -o posix
saved_env=$(export -p)
set +o posix
}
restore_environment() {
eval
On Sat, Nov 24, 2012 at 10:29:30PM +, Lawrence Steeger wrote:
Alex Chupin (achupin achupin at cisco.com writes:
$ bash --version; s=12345;if [[ $s =~ '^[0-9]+$' ]]; then echo it is a
number; else echo it is NOT a number; fi
The single quotes are being used in the match. If you remove
On Sun, Nov 25, 2012 at 06:33:19AM +0100, Rene Herman wrote:
I'm currently writing a larger bash script to manage my (ogg vorbis)
music collection, including maintaining tags. Vorbis files can and
(mine) often will contain repeated tags such as, say, artist=David
Crosby and artist=Graham
On Tue, Nov 27, 2012 at 07:57:28PM +0100, Tim Friske wrote:
I came accross the `-v` option of the `test` command and wondered how I
would possibly test not only string- and integer- but also array variables
as a whole and in parts.
Sounds more like a help-bash question than a bug-bash
On Wed, Nov 28, 2012 at 09:10:02AM -0800, Mun wrote:
I need to run a script via cron that in turn launches a script to set up the
requisite environment variables needed for a successive script that is called.
Moreover, I need to change my group ID in order for the scripts called within
the
On Tue, Dec 11, 2012 at 02:31:28PM -0500, DJ Mills wrote:
First of all, the man page and help output state:
`The return status of a coprocess is the exit status of command.'
No matter what, coproc seems to always return true.
To reproduce:
coproc false || echo error1 2; wait
On Fri, Dec 14, 2012 at 08:37:02AM +0100, Francis Moreau wrote:
Then maybe an option should be added to 'local' to display the full
description that one can get from the manual, or maybe change the
behaviour of '-m' switch ?
Almost every builtin command has a shorter and less informative
On Wed, Dec 19, 2012 at 04:49:32PM -0500, Chet Ramey wrote:
I get the same results if I run the pipeline in an interactive shell.
This is pretty much what I expect. The whitespace and newlines will
disappear due to read's $IFS processing if they're first or last in
the string.
Which is why
On Thu, Dec 20, 2012 at 07:43:50AM -0800, giuseppe.amatu...@gmail.com wrote:
for dir in UA_tile_tif_pop_txt UA_buf10_tile_tif_pop_txt
UA_buf20_tile_tif_pop_txt UA_buf30_tile_tif_pop_txt UA_buf40_tile_tif_pop_txt
UA_buf50_tile_tif_pop_txt ; do echo $dir ; done | xargs -n 1 -P 6 bash -c '
On Tue, Jan 08, 2013 at 10:26:19PM +, John Caruso wrote:
I checked the
bash source but couldn't suss out (in a brief look) how minor bash
versions are accounted--there's no 4.2.10 or 4.2.24 source, just 4.2
source plus a bunch of patches, and it's not clear if those patches have
made it
On Fri, Jan 11, 2013 at 10:21:55PM +0800, Ma Shimiao wrote:
I used commands as follows:
$seq 5 | mapfile -C echo -c1
0 1
1 2
2 3
3 4
4 5
I would have expectd 1,2,3,4,5 above from thehelp mapfile.
Is it a bug of mapfile?
The help says:
When CALLBACK is evaluated, it is
shopt -s checkwinsize only works in interactive shells. However, this
is not mentioned in the manual.
Tested in Bash 4.2.37.
#!/bin/bash
trap 'echo COLUMNS is now $COLUMNS' WINCH
test -z $COLUMNS COLUMNS=$(tput cols)
shopt -s checkwinsize
while sleep 1; do :; done
Run in a terminal, resize
On Sun, Jan 13, 2013 at 03:31:24AM +0100, John Kearney wrote:
set -o errexit
test_func() {
[ ! -d test ] echo test2
}
echo test3
test_func
echo test4
now so long as test doesn't exist in the cwd it should errexit.
at least it did for me just now.
Cannot reproduce.
imadev:~$ cat
On Mon, Jan 14, 2013 at 08:08:53PM +0100, John Kearney wrote:
this should exit.
#!/bin/bash
set -e
f() { test -d nosuchdir echo no dir; }
echo testings
f
echo survived
OK, cool. That gives me more ammunition to use in the war against set -e.
On Tue, Jan 15, 2013 at 11:30:39AM -0500, DJ Mills wrote:
I believe that's referring to var=value command, as in the syntax to export
a variable into commands environment.
readonly a=3
a=2 echo foo
I thought that was what it meant, too, but I couldn't reproduce the bug
that it was claiming
On Tue, Jan 22, 2013 at 06:56:31AM -0500, Steven W. Orr wrote:
By that logic,
foo 21 | bar
should not work, but it does. It takes stderr and dups it to stdout, and
*then* takes stdout and send it to a pipe.
Incorrect. The pipeline is created first, and *then* the dup (21) is
performed.
On Tue, Jan 22, 2013 at 07:45:10PM +0100, Andreas Schwab wrote:
Greg Wooledge wool...@eeg.ccf.org writes:
On Tue, Jan 22, 2013 at 06:56:31AM -0500, Steven W. Orr wrote:
foo 21 | bar
The pipeline is created first, and *then* the dup (21) is
performed.
This is true, but not obviously so
On Wed, Feb 06, 2013 at 12:39:45AM +0100, Tiwo W. wrote:
When using this in a script of mine, I noticed that this fails
when errexit is set (set -e).
Most things do. set -e is crap. You should consider not using it.
* why does it work with set +e ?
Because set +e
On Wed, Feb 06, 2013 at 07:12:01PM +0100, John Kearney wrote:
IFS= read -rd '' var2 EOF || true
should work.
Which is essentially equivalent to doing set +e before, and set -e
again right after. In either case, you're temporarily working around
the brokenness of set -e for a single command.
On Mon, Feb 11, 2013 at 06:59:35PM +, Alan Mackenzie wrote:
From a bash script, I'd like to be able to start several subtasks and
react to any one of them completing. I don't think I can do this with
the current bash. The `wait' function either waits on a specified subtask
to finish, or
On Mon, Feb 11, 2013 at 06:50:49PM +0100, Dashing wrote:
$ ./pe 'mplayer foo1\ foo2\ foo3\ 4\ 5\ foo6\ 7'
:--Mistake--:
:--Mistake--:
Whatever you're doing, it's wrong.
./pe mplayer foo1\ foo2\ foo3\ 4\ 5\ foo6\ 7
#!/bin/bash
prog=$1
shift
exec $prog extra args go here $@
THAT is how a
On Tue, Feb 12, 2013 at 02:37:03PM +0100, Dashing wrote:
For my purposes this is irrelevant, because the nature of the
script from which my example code derived is tab completion.
READLINE_LINE will contain mplayer foo1\ foo2\ etc.
Then you are still doing something wrong.
imadev:~$ args
On Tue, Feb 12, 2013 at 11:07:06AM -0500, Matei David wrote:
On a different but related note, I hate having to do eval to manipulate an
fd stored in a variable. Why doesn't 'llfd $x-' work, especially since
'llfd $x' works just fine... so by the time is handled, the variable
substitutions
On Tue, Feb 12, 2013 at 04:20:53AM -0800, laurent.tes...@gmail.com wrote:
liste=`ls *.T02`
This is broken because filenames may contain spaces, newlines, etc.
Use an array instead:
liste=(*.T02)
See http://mywiki.wooledge.org/BashPitfalls for an explanation of some
of the issues.
This type
POSIX specifies the behavior of a shell. This tells Chet how he has to
make Bash behave (with some leeway). There are all kinds of silly little
details and ambiguities that Chet has to worry about.
However, YOU as a shell script writer do not have to worry about all
that crap. All you have to
On Tue, Feb 26, 2013 at 01:27:35PM -0800, Linda Walsh wrote:
Except it isn't a script -- it's input that came from
the terminal, that got repetitively edited using vi mode, until it got
saved in a file so it could continue to be edited, and stay on the screen
while executing it in the
On Wed, Mar 13, 2013 at 11:52:54PM -0700, Linda Walsh wrote:
Sorta makes the idea of a restricted shell a bit less useful.
Honestly, a restricted shell is usually a pitiful thing that would be
a joke, except it's not even funny. It's what people tried to use for
security back in like 1990 when
On Wed, Mar 27, 2013 at 11:29:38AM -0700, Linda Walsh wrote:
include lib/Util/Needroot.shh
where include is a function the name of a file in my path (or an alias
to define the function)...
/home/law/bin/recycle_space: line 7: lib/Util/needroot.shh: division by
0 (error token is
On Wed, Mar 27, 2013 at 12:17:21PM -0700, Linda Walsh wrote:
dcl -xa _FPATH
Arrays cannot be exported. The bash manual explicitly says so:
Array variables may not (yet) be exported.
} | ( ((!(remove||expire))) hsort -s || cat)
Use of the and || operators together as a shorthand for
On Wed, Mar 27, 2013 at 02:37:16PM -0700, Linda Walsh wrote:
Greg Wooledge wrote:
Array variables may not (yet) be exported.
Associative arrays can't be exported either.
Yeah, but they seem to get propagated anyway, I must save it somewhere
like
I do _FPATH... i.e. each
On Fri, Mar 29, 2013 at 12:41:46AM -0700, Linda Walsh wrote:
include was designed to search the path for functions that
are relative paths. While the normal sourcepath allows searching for
filenames on the search path, I don't believe (please correct if I am wrong
and this works now, as
On Fri, Mar 29, 2013 at 04:10:22PM +0100, John Kearney wrote:
consider
dethrophes@dethace ~
$ read -ra vals -d '' $'lkjlksda\n adasd\n:sdasda:'
dethrophes@dethace ~
$ echo ${vals[0]}
lkjlksda
You forgot to set IFS=: for that read.
imadev:~$ IFS=: read -ra vals -d '' $'lkjlksda\n
On Thu, Apr 04, 2013 at 02:26:34AM -0500, Dan Douglas wrote:
On Wed, Feb 6, 2013 at 11:30 AM, konsolebox konsole...@gmail.com wrote:
Hi. I was wondering if we could add a builtin where we could use it as an
alternative for assigning values to a parameter. And thought of a builtin
name
On Thu, Apr 04, 2013 at 09:11:49PM +0800, konsolebox wrote:
On second thought I think we still need the function since for declare -n:
a) Reference variable could not be an array.
I'm not sure what you mean. But namerefs may point to arrays or
associative arrays in the caller's context.
On Thu, Apr 04, 2013 at 09:17:00PM +0800, Chris Down wrote:
Perhaps my reply here[1] can help out. Only looked briefly, but it seems it
could at least eliminate the calls to eval (although it doesn't support some
more rare tilde expansions).
Chris
1:
On Thu, Apr 04, 2013 at 10:56:35AM -0700, Andy Valencia wrote:
Description:
If one has a file data.txt and a shell script x, it used to
be possible to run this with sh x dattab and have the file argument
completed to data.txt. As of Debian Wheezy update completion
On Thu, Apr 04, 2013 at 08:51:19PM -0500, Mara Kim wrote:
The biggest benefit is that it is just plain easier than managing a
directory of symbolic links on your own. I am extremely lazy.
Here is an example use case. At the end of a work day, I like to bookmark
the folder I am working in on
On Fri, Apr 05, 2013 at 09:15:10AM +0800, konsolebox wrote:
The only thing left here is that we can't have error control like when we
are to create generally shared library scripts e.g.:
function lib_something {
declare -n VAR=$1 /devnull || { # error message is not suppressed
:
On Sun, Apr 07, 2013 at 01:13:09AM -0700, Linda Walsh wrote:
getent passwd 'Domain Administrator'
Domain Administrator:x:500:18:Domain Admin accnt:/home/root:/bin/bash
getent(1) is fine where it's available, but it's not a standard tool,
so you can only use it on systems that have it.
If
On Mon, Apr 08, 2013 at 10:32:40AM -0400, Chet Ramey wrote:
One clarification: a variable is unset unless it has had a value assigned.
There might be some placeholder there with some type information, but the
variable is unset. There might be some inconsistencies in how bash treats
such
On Mon, Apr 08, 2013 at 05:13:46PM -0700, Linda Walsh wrote:
Greg Wooledge wrote:
getent(1) is fine where it's available, but it's not a standard tool,
so you can only use it on systems that have it.
Have you encountered it on other linux systems?
It is present on Debian 3.1 (the oldest
On Thu, Apr 11, 2013 at 01:05:43PM +, Lenga, Yair wrote:
Is it possible to add back the functionality to allow the child process to
somehow retrieve it's OWN PID.
You are looking for the BASHPID variable, which expands to the process
ID of the current bash process (even in a subshell).
On Thu, Apr 11, 2013 at 04:15:45PM +, Lenga, Yair wrote:
+ The man page list BASH_VERSION, etc., but no indication of BASHPID. It's
probably a good idea to put a note next to '$!' about BASHPID.
It is certainly in the man page:
BASHPID
Expands to the process ID of the
On Thu, Apr 18, 2013 at 11:59:40AM +0200, and...@coolbox.se wrote:
The ARITHMETIC EVALUATION section of the man page claims equivalence with C
for all the operators, but in reality bash does not perform short circuit
evaluation, which implies that the logical operators do NOT produce the same
On Sun, Apr 21, 2013 at 12:25:20AM -0700, Linda Walsh wrote:
If I 'reedit my last statement, it indents 8 spaces/tab.
What does this sentence mean? I am completely stumped. What is
the sequence of steps you are actually performing?
On Mon, Apr 22, 2013 at 10:54:35AM -0700, Linda Walsh wrote:
Type in this:
echo 'while read fn;do
tabd=${fn%.zip}
This is where I lose you completely. If I press Tab where you indicate,
nothing happens at all.
If I press Tab twice in a row there, bash offers to tab-complete against
all the
On Mon, Apr 22, 2013 at 12:35:02PM -0700, Linda Walsh wrote:
I.e. do whatever you do to insert a TAB there. for me, I press TAB,
Others have to work around BASH's unwanted, 4.x behavior.
I am not able to reproduce your problem.
Here is what I did:
imadev:~$ echo 'x
y
z'
Which means
On Sun, May 12, 2013 at 05:50:18PM -0500, Peng Yu wrote:
set -o vi.
Then I type v to enter the vi editor. In the vi editor, I type 'cd
/tmp'. Then, I get the following screen output. Notice that the prompt
does not change immediately after the cd command. Could anybody
reproduce this
On Thu, Jun 06, 2013 at 03:48:09PM -0700, Linda Walsh wrote:
I wanted to test to see if a function was defined
imadev:~$ unset foo
imadev:~$ foo=variable
imadev:~$ bar() { echo I am a function; }
imadev:~$ declare -f foo /dev/null 21 ; echo $?
1
imadev:~$ declare -f bar /dev/null 21 ; echo $?
0
On Fri, Jun 07, 2013 at 09:09:53PM +0800, jida...@jidanni.org wrote:
Well OK but sometimes a script could be running for years, during which
any change to a file will result in bash executing random bytes...
This is why you don't edit an installed script in-place. Instead, you
move it aside,
On Fri, Jun 07, 2013 at 10:15:46PM +0800, jida...@jidanni.org wrote:
Well it is going to happen anyway, so maybe bash should check by
default, and not check if -o risky is set or something. It can't be that
expensive.
Yes it can. You're talking about adding a ridiculous amount of extra
On Sun, Jun 09, 2013 at 08:39:10AM +0800, jida...@jidanni.org wrote:
# gdk-pixbuf-query-loaders |
/usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
bash: gdk-pixbuf-query-loaders: command not found
I know it doesn't directly address your issue, but in cases like these,
I find tab
On 10 Jun 2013 14:15, Chris F.A. Johnson ch...@cfajohnson.com wrote:
It is not the least bit difficult with eval:
eval array=( \\${$1[@]}\ )
On Mon, Jun 10, 2013 at 09:17:23PM +0800, Chris Down wrote:
Enjoy your arbitrary command execution.
To be fair, Chris Johnson was probably
On Mon, Jun 10, 2013 at 10:23:10AM -0400, Chris F.A. Johnson wrote:
On Mon, 10 Jun 2013, Chris Down wrote:
Enjoy your arbitrary command execution.
Can you give me an example, using the code I posted, where that would
happen?
On 10 Jun 2013 14:15, Chris F.A. Johnson
On Wed, Jun 12, 2013 at 07:37:09AM +0200, Sascha Gaspar wrote:
The \H in PS1 adds the hostname without the domain to the prompt.
According to the man page \h outputs the hostname up to the first `.'
and \H outputs the the hostname. I think that should be the FQDN?
Well, the manual
On Thu, Jun 13, 2013 at 04:42:36PM -0700, Linda Walsh wrote:
Chris F.A. Johnson wrote:
The baskspaces (\b) are erasing your input, not the function's
output.
That's incorrect. A backspace character sent to a terminal device
moves the cursor (or does whatever else the terminal chooses to
On Fri, Jun 14, 2013 at 06:25:12AM -0500, Dan Douglas wrote:
Also forgot to mention (though it should be obvious).
$ ~/doc/programs/bash43 -c 'function f { typeset -n x=$1; : $x; }; a=(yo
jo); f a[\$(echo yes this even applies to namerefs2)0]'
yes this even applies to namerefs
No, that
On Thu, Jun 20, 2013 at 12:39:56AM +0800, Chris Down wrote:
On 20 June 2013 00:29, DJ Mills danielmil...@gmail.com wrote:
wordsplitting and pathname expansion do not occur within the
[[ keyword.
$ foo
$ [[ foo == * ]] echo bar
bar
That's pattern matching, which is neither word
On Wed, Jun 19, 2013 at 06:12:57PM -0500, Dan Douglas wrote:
Thanks to mksh, posh, etc not supporting POSIX character classes at all, I'm
not so sure it's actually better in practice. (talking about standard shell
pattern matching of course)
I'm fairly sure nobody on the entire planet uses
On Fri, Jun 21, 2013 at 02:39:14AM -0500, Dan Douglas wrote:
If you're writing a script in bash, you MUST NOT use the [a-z]
or [A-Z] ranges, or any other alphabetic ranges, unless you are
working in the POSIX locale. If you use an alphabetic range in any
other locale, you invite disaster.
On Tue, Jul 02, 2013 at 05:36:43AM +0200, Tomasz Tomasik wrote:
bash -c 'foo=??ó??w; echo ${foo^^}'
??ó??W
Characters with diacritical marks are not affected.
I get the same result in ISO-8859-1:
imadev:~$ x='fóo'; echo ${x^^}
FóO
imadev:~$ locale
LANG=en_US.iso88591
LC_CTYPE=en_US.iso88591
On Wed, Jul 10, 2013 at 02:54:17PM -0700, Jason Sipula wrote:
~]# mysqldump -u someuser -p somedb | mysql -u someuser -p -D someotherdb
This isn't a bash issue. Mysql is prompting for a password, either
on standard input or by directly opening /dev/tty. In either case,
the issue is with mysql.
On Thu, Jul 11, 2013 at 10:47:12AM -0700, Jason Sipula wrote:
I still think this is a bash issue. After the command terminates, you must
restart your bash session to return to normal functionality. Nothing typed
into the terminal displays but it does receive it.
If the terminal has been messed
On Thu, Jul 11, 2013 at 10:53:11AM -0700, Jason Sipula wrote:
The second issue is once the command terminates, bash session does not
behave normally at all. Nothing typed into the terminal over SSH or
directly on the console displays, however it does receive the keys. Also,
if you repeatedly
On Sun, Jul 14, 2013 at 02:06:07PM -0700, Linda Walsh wrote:
I was trying to find the location of the current development
source.
I followed the access instructions at:
https://savannah.gnu.org/cvs/?group=bash
http://savannah.gnu.org/git/?group=bash
On Wed, Jul 17, 2013 at 08:42:17PM +, gscant...@comcast.net wrote:
I wish to ssh this command to several hosts:
ls -alst dir_with_spaces
for host in ${hosts[@]}; do
ssh $host bash -'EOF'
ls -alst your directory
EOF
done
The - in front of the here document's delimiter
On Sat, Jul 27, 2013 at 01:34:53AM +0900, David H. wrote:
# The test string:
$ echo $instring
root:x:0:0:root:/root:/bin/bash
# Gives incorrect (unexpected) output:
$ ( IFS=: read -a strings ( echo $instring ) ; printf '[%s]\n'
${strings[@]} )
[root x 0 0 root
On Fri, Jul 26, 2013 at 10:38:46PM +0200, Andreas Schwab wrote:
Greg Wooledge wool...@eeg.ccf.org writes:
Your unquoted $instring is being split into fields by bash, which is
operating with IFS=: at that point.
Variable assignments are supposed to be performed _after_ redirections
(read
On Mon, Jul 29, 2013 at 06:36:58PM +0300, Pierre Gaston wrote:
it's not clear (like it is for, say, exit) what the relationship
between return and process is.
I guess most people expect it to not care about subshells and just
execute the statement after the function call.
Most people barely
On Tue, Jul 30, 2013 at 01:15:59PM +0300, Pierre Gaston wrote:
while :;do ( while :;do break 2; done);echo foo;done
Should this raise an error? is the break in a loop context? what's a
loop context?
The break occurs in a subshell, which means it cannot communicate what
I presume to be the
On Tue, Jul 30, 2013 at 04:12:07PM +0200, Roman Rakus wrote:
f1() {
: | while :; do return 3; done
echo $?
return 1
}
echo $?
f1; echo $?
return 2
My point is that the `return 3' in while loop is in subshell and will
not return from the function
Correct. It will
On Wed, Jul 31, 2013 at 02:09:23AM +0200, Jörn Hees wrote:
i think this would be a very useful feature and i don't seem to be alone:
http://stackoverflow.com/questions/5955577/bash-automatically-capture-output-of-last-executed-command-into-a-variable
Bash has no knowledge of, and no way to
On Thu, Aug 01, 2013 at 09:37:38AM +0200, Lakshminarasimhan Srinivasan wrote:
ldapscripts do not work from inside a while read line loop.
The exact same scripts were working fine until the last upgrade
-
#!/bin/bash
echo Testing if it
On Fri, Aug 09, 2013 at 10:47:21PM -0600, Bob Proulx wrote:
John Vincent wrote:
echo {1..2000}
it runs, but afterwards whenever I enter another command I get the error:
-bash: fork: Cannot allocate memory
You need to allocate more virtual memory space to your machine. You
are
On Mon, Aug 19, 2013 at 05:50:31AM +0200, Chris Down wrote:
On 2013-08-18 16:57, David Lehmann wrote:
The ((i++)) fails only when the result is 1. When the result is 0 or 2, it
does not fail. This is a problem when 'set -e'.
This is normal and expected. If the value returned in an ((
On Mon, Aug 19, 2013 at 05:53:03AM +0200, Chris Down wrote:
On 2013-08-18 17:46, Linda Walsh wrote:
I don't find the variable for the process ID of the
last started background process documented in the bash manpage...
Am I just missing it, or did it get left out by accident or
where did
On Mon, Aug 19, 2013 at 08:02:39PM -0700, Linda Walsh wrote:
Yes, I see what you mean. I guess I'm not real certain
as to why, if CDPATH=~/Documents, and I type cd Pictures/family
and end up in ~/Documents/Pictures/family, then PATH shouldn't work
the same way.
There are several
On Tue, Aug 20, 2013 at 05:48:12PM +0300, Aharon Robbins wrote:
In article mailman.403.1376999138.10748.bug-b...@gnu.org you write:
1) PATH is used by the kernel (exec family) to determine how commands are
executed. The way PATH is used by the kernel is not likely to change.
Having the
On Wed, Aug 21, 2013 at 02:22:24AM -0800, Ken Irving wrote:
$ cat $(ambler.method dispatch)
#!/bin/bash
method=$1 shift
test -n $method || exit
for s in $(ls|shuf); do
tob $s.$method $@
done
As far as I can tell, this is some incredibly stupid crap thrown
On Thu, Aug 29, 2013 at 12:57:22PM -0400, DJ Mills wrote:
On Thu, Aug 29, 2013 at 12:42 PM, DJ Mills danielmil...@gmail.com wrote:
When using a non-default IFS (a default IFS would trim them), a single
empty trailing field is ignored for read -a.
IFS=: read -rd '' -a arr (printf %s
On Wed, Sep 04, 2013 at 10:06:16PM -0700, kneuf...@gmail.com wrote:
$ [ ! -e stuff.txt ]; echo $?
1
$ [ ! -a stuff.txt ]; echo $?
0 # what?
Both these version show the exact same behaviour.
Fedora 18, bash 4.2.45(1)-release
OSX, 3.2.48(1)-release
Also occurs in 4.3.0-beta.
On Sun, Sep 08, 2013 at 11:21:56AM -0500, Dennis Williamson wrote:
The man page says Note that a negative offset must be separated from the
colon by at least one space...
Enclosing the negative offset in parentheses also works.
The reason you must use either parentheses or spaces between them
On Wed, Sep 18, 2013 at 11:54:13PM +0800, zxycscj wrote:
I have downlaod bash-4.2.tar.gz and all the patches for it.
how to use the patch files to install?
http://ftp.gnu.org/gnu/bash/
bash-4.2.tar.gz
http://ftp.gnu.org/gnu/bash/bash-4.2-patches/
bash42-001.sig
bash42-001.txt
...
gzip
On Thu, Sep 26, 2013 at 06:27:10AM +, Hinrik Örn Sigurðsson wrote:
The operator in bash seems to inhibit backgrounding when run over
ssh. You can try it with the following:
ssh localhost cd /tmp nohup sleep 10 /dev/null 21
The above command will wait for sleep(1) to finish before
On Fri, Sep 27, 2013 at 03:50:09PM +0530, Roland Winkler wrote:
I guess there is not too much one can say about the bash built-ins
`true' and `false'. Nonetheless, I suggest that the info pages
should list these built-ins individually like other built-ins.
Currently, the only hint on their
On Thu, Oct 03, 2013 at 03:18:16AM -0700, vic...@vsespb.ru wrote:
-e will return file not exists, even if it does, when permission denied error
happen. I am wondering if this documented/correct behaviour or no.
I assume you mean that bash will return 1 (failure) for [[ -e /path/to/file ]]
when
On Sun, Oct 06, 2013 at 09:37:00PM -0300, Carlos Pita wrote:
I'm not completely sure whether this is a bug or not but it seems
not possible to immediately exit a shell when an error happens at 2+
levels of subshell nesting.
Exiting in a subshell will never cause the parent shell to exit,
401 - 500 of 1711 matches
Mail list logo