Greg Wooledge wrote:
On Tue, Nov 02, 2010 at 03:48:49PM -0400, Pete Gregory wrote:
echo {2147483640..2147483647}
dies with a malloc error
In bash 4.1.9 under HP-UX 10.20, it consumes all available CPU until
I kill it with SIGKILL. (I suppose there's a chance it might eventually
have died due
Eric Blake wrote:
In static scoping, function f2 does not shadow a declaration of a, so
references to $a within f2 refer to the global variable. The local
variable a of f1 can only be accessed within f1; the behavior of f2 is
the same no matter how it was reached.
If it matters (I already kno
sworddrag...@aol.com wrote:
Description:
It is possible to make input with the keyboard before bash is fully
initialized. This problem is critical on password inputs like the linux login.
Repeat-By:
$input is now shown before and after sworddra...@ubuntu:~$. Example:
testsworddra...@u
Roger wrote:
If you want the PID of the current shell process, use $$ instead.
Yes I do. It's only me on this computer, unless you're speculating on
prioritizing a snooper. :-O
This is (in this context) not related to the number pf "bash" processes
running. Not at all.
--
Be conservative
jens.schmid...@arcor.de wrote:
For an empty "$@" this does not throw an "unbound" error, which seems to be
an inconsistent behaviour to me.
-u Treat unset variables as an error when substituting.
I think the behaviour is consistent with the documentation.
--
Be conservative in what you d
jida...@jidanni.org wrote:
$ cat 201012contract
#!/bin/sh -eux
set a b c d e f
: ''$@''
: ' '$@' '
: ''$*''
: '' $* ''
: " "$* " "
$ ./201012contract
+ set a b c d e f
+ : a b c d e f
+ : ' a' b c d e 'f '
+ : 'a' b c d e 'f'
+ : '' a b c d e f ''
+ : ' a' b c
Joerg Boehmer wrote:
The value of variable ar[1] is expanded to 0 although it was not set.
The full syntax produces the expected behavior:
The value of y is 0, since you operate in arithmetic context. This is
fine. But I definitely agree it should bail out here.
--
Be conservative in what y
jida...@jidanni.org wrote:
Well anyway, it would be 'no skin off of bash's back' if it just
reported what it was given.
If it was given
' 'a b c
it should report
' 'a b c
and not just 'assume' we prefer
' a' b c
or
' a' 'b' 'c'
etc.
Just as legitimate and doesn't cause calls in the middle
jens.schmid...@arcor.de wrote:
-u Treat unset variables as an error when substituting.
I think the behaviour is consistent with the documentation.
The question is rather when to consider a variable set or unset.
I'm not sure about the intended meaning here, but I don't consiter $@ as
a var
Hello list,
maybe something for old stagers.
Bash (and POSIX, and Korn, ...) do field/word splitting on the result of
arithmetic expansions. This is fine, the behaviour per se is not a
problem at all.
However, I wonder about the original thought behind it: Is there a
specific reason or need
Chet Ramey wrote:
Arithmetic expansion is a Posix invention. It's treated just like every
other expansion: split unless double quoted. There's no compelling
reason to make it behave differently.
I don't want it to behave differently :)
Okay, so it's just "as is", because by consistent desig
Hello list,
the read builtin command, when trying to assign to a readonly variable
after reading the data, spits an error message. This is fine.
But the return status is 0. It "always" (down to 2.04 was tested) has
been like that, and it's like that in upcoming 4.2.
For me, this doesn't ma
Alexander Tiurin wrote:
~$ time for i in `seq 0 1` ; do echo /o/23/4 | cut -d'/' -f2 ; done > /dev/null
To track this a bit, I ran the exact command several times in a Bash
3.2, seeing increasing execution times (40s up to ~2min), as reported.
I knew there were several bugs about filed
Chet Ramey wrote:
I can't imagine this is just some debugging code still active (it's a beta).
Imagine. Anything that doesn't have a version tag of `release' has DEBUG
enabled for the preprocessor, which enables MALLOC_DEBUG. If you're using
the bash malloc, MALLOC_DEBUG turns on extensive m
Hello,
the help output for the set builtin command misses '--'.
The manpage is ok.
(recognized by 'yitz' on irc://irc.freenode.net/#bash)
--
Be conservative in what you do, be liberal in what you accept from others.
- jbp, master of the net, in RFC793
Greg Wooledge wrote:
Or:
set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
More:
set [-abefhkmnptuvxBCHP] [-o option-name] [-] [--] [arg ...]
Plus: Describe '--' the same way '-' is described (with an extra part in
the full help message below the synopsis).
--
Be conservative i
Dennis Williamson wrote:
I think this distinction from the man page is what's missing in the help:
> [...]
Exactly. Thanks for pointing it out, I thought it was clear :)
--
Be conservative in what you do, be liberal in what you accept from others.
- jbp, master of the net, in RFC793
Marc Herbert wrote:
seq is not exactly Linux-only but GNU-only.
GNU-specific versus bash-specific, which is worse? I'd say it
depends... on which mailing-list you post :-)
I'd say a script interpreted by the GNU shell must not rely blindly on
GNU tools being installed or on running on a GNU
Hello world,
I recently answered a question about using the asterisk mixed with
redirection and other words. This also lead me to the documentation that
states (REDIRECTION section):
---
The word following the redirection operator in the following
descriptions, unless otherwise noted,
Roman Rakus wrote:
It is noted in Here Documents (and Here Strings is a variant of here
documents). And there is:
No parameter expansion, command substitution, arithmetic expansion, or
pathname expansion is performed on word.
This is not true for here strings (infact, it wouldn't make sense
Bradley M. Kuhn wrote:
I humbly suggest that http://git.savannah.gnu.org/cgit/bash.git be
replaced with this repository above that I've created. The new
repository contains everything that the current Savannah one does, but I
put much more effort into making commits fine-grained, rather than
me
Hi,
just as side note, not meant to touch the maintainer discussion.
This is not only a "Bash problem". The programmer/user mistake to use
[A-Z] for "only capital letters, capital A to capital Z" is a very
common one.
But I'm not sure if every official application-level documentation
shoul
Andreas Schwab wrote:
"Steven W. Orr" writes:
As a work around, I can use eval or the builtin test, but my question is
this: Is this a bug or is there a reason that it should work for
arithmetic but not for the test [[ operator?
[[ is a reserved word like if, which triggers special parsing r
John Williams wrote:
I find that I cannot execute world-executable scripts when they are in
a directory which is mounted on a drive on an HBA (host bus adapter
Can you show the mount options of the filesystem?
--
Be conservative in what you do, be liberal in what you accept from others.
- jbp
Hi,
I agree this is not a bug. %c works as described.
However, Mr. Wang may want to read one of Greg's brilliant FAQ entries [1].
In general it's a bit of a pity that printf can do character->number
conversion, but not (directly) back. But it is like it is and the
"workarounds" are not reall
Yunfeng Wang wrote:
Perhaps bash should clarify this issue in its documents such that users like me
would not be misguided again.
Since the reference to printf(3) is misleading sometimes, I made some
document [1] for Bash's printf only. It's far from perfect, but at least
it mentions %s and
On 22.07.2011 18:12, the mad doctor kaeding wrote:
is this a bug?
echo goodbye\ cruel\ world\!
goodbye cruel world!
echo "goodbye cruel world!"
bash: !": event not found
echo "goodbye cruel world\!"
goodbye cruel world\!
No, this is a specific history expansion in interactive shells.
E
Hi folks,
a suggestion about recursive function calls (and not only that, of course).
Do you see a way for Bash to pull the emergency break before it runs out
of stack here (to provide an error to the user, rather than a crash):
f1() {
f1
}
f1
Cu
On 01.07.2012 14:37, Roman Rakus wrote:
Look for FUNCNEST variable. In recent release it is available.
I more meant the shell interpreter, less the code I can write.
--
Be conservative in what you do, be liberal in what you accept from others.
- jbp, master of the net, in RFC793
On 02.07.2012 15:57, Eric Blake wrote:
Look for FUNCNEST variable. In recent release it is available.
I more meant the shell interpreter, less the code I can write.
It would be possible to link bash with libsigsegv to install a graceful
stack overflow handler that allows a nicer exit message
On 02.07.2012 20:57, Chet Ramey wrote:
On 7/2/12 2:36 PM, Jan Schampera wrote:
The origin of this all was a "bugreport" to me about the manual lying about
no limits on recursion
That's funny.
Aye. A bit of confusion.
--
Be conservative in what you do, be liberal in what
On 04.09.2012 13:13, Roman Rakus wrote:
Hi,
Petr, adding to cc: list, found behaviour not documented, neither in man
page nor bash ref manual:
${par-word} will do expansion of par, and if the par is unset it is
substituted by word. It is different from ${par:-word}, where word is
used when par is
Hi folks.
Currently, the documentation (both, help-command and manpage) on
ulimit -f says:
"The maximum size of files created by the shell"
which may make one think of, it only affects files that are created
from the shell itself.
Assuming -f works like it should work, a text like:
"The maxi
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash
Begin forwarded message:
Date: Mon, 2 Jul 2007 18:32:49 +0200
From: Jan Schampera <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] (Bob Proulx)
Subject: Re: Arithmetic expressions and parameters with newlines breaks
On Mon, 2 Jul 2007 10:08:08 -0600
[EMAIL PROTECTED] (Bob Proulx) wrote:
On Thu, 2 Aug 2007 09:29:19 -0400
Chet Ramey <[EMAIL PROTECTED]> wrote:
> > Here was an interesting bug which was some what unexpected.
> >
> > cat <(find ./ -iname t{1,2,3})
> >
> > this is a valid command according to bash due to a bugged expansion
> > of {1,2,3} and the process expansion. It
Jack Lloyd wrote:
Description:
The time builtin seems to be confused if something is
backgrounded, and prints immediately the time rather than
waiting for the job to complete. I found this very unexpected.
Repeat-By:
$ time sleep 5
# hit C-Z to stop the job before 5 se
Pratiksha Powar wrote:
Description:
Yum not able to access url through bash
Repeat-By:
Following is the sequence of commands and the results:
1. [EMAIL PROTECTED] /]# yum install gcc
2. Loading "installonlyn" plugin
3. Setting up Install Process
4. Setti
Chet Ramey wrote:
Description:
there is missing a charachter when using the following:
# TT="oo"; echo "l${TT:1}l"
lol
# TT="o"; echo "l${TT:1}l"
l
I can't reproduce this; I get `ll' from the second expansion.
I can't reproduce it on a 2.05b:
$ TT="o
Jari Aalto wrote:
testfunc () $
{ $
echo "this is test"$
}$
Just a thought:
It looks like there is a system behind it. So I guess it's some parser
thing that needs it like that.
However, just guessing.
Jan
Mike Frysinger schrieb:
> is it even possible to utilize NUL in scripts ? or does bash just strip it
> out ? for example, trying to work with binary data:
> foo=$( echo "${foo}" > new-file
> the "new-file" will be exactly "binary-file" if all NUL bytes are stripped out
>
> or perhaps i want to
Ken Failbus wrote:
> When I specify on command-line "bash -n ". Bash doesn't
> check for valid syntax errors. E.g. if variable is missing a "$" infront
> of it while assigning a value. This is not catched by bash.
> ### example code
> p=hello
> e=world
> If [ p != $e ];then
> echo "not equa
Andreas Schwab wrote:
>> $ unset .foo-bar
>> bash: unset: `.foo-bar': not a valid identifier
>
> Use unset -f.
IMHO there is a bug. The docs say that ''unset'' without a specific
switch affects variables AND functions, hence it should allow the names
for both (or it should ONLY affect
yitzle wrote:
> fileIn="blah"
> for i in "$(cat $fileIn)"
> do
> echo $i
> echo
> done
Check out http://wooledge.org/mywiki/BashFAQ#faq1
J.
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash
Per Starbäck wrote:
> Repeat-By:
> echo foo=~root => foo=/root
> echo --foo=~root=> --foo=~root
>
> In the second one there is no expansion.
>From my understanding of the manpage and the SUS the first one is
"wrong", it should not be expanded. I don't say it's
Chet Ramey wrote:
> seba wrote:
>> #!/bin/sh
>>
>> fib() {
> You managed to write yourself an infinitely-recursive function, and
> eventually ran out of stack space. `==' is a string operator, not a
> numeric operator, when used with `['.
Most likely. When I test this and it breaks, the stack h
William Tambe wrote:
> The code below should only print end
> [ "test" = "test" ] && {
> # after the false command bash should jump directly to echo end
> # but instead run echo echo "test != test"
> false
> } || {
> echo "test != test"
> }
>
> echo end
It's okay like that, it's
Chet Ramey wrote:
> Dave Rutherford wrote:
>
>> Now, "[[" isn't very well documented, so I tend not to use it,
>
> I'm always interested in suggestions for improving the bash documentation.
> Can you tell me what's unclear about the existing description of
> `[['?
>
> Chet
>
The documentation
Lea Wiemann wrote:
> Repeat-By:
>
> IFS=$'\n'
> a=(A B C D)
> b=("[EMAIL PROTECTED]")
> echo "[EMAIL PROTECTED]", "[EMAIL PROTECTED]" # 4, A B C D -- OK
> b=("[EMAIL PROTECTED]:2}")
> echo "[EMAIL PROTECTED]", "[EMAIL PROTECTED]" # 1, C D -- bug, should be 2,
> C D
I have to correct myself, i
Lea Wiemann wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i486
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/
Scott Mcdermott wrote:
> Bash does not seem to take the last record if it has no
> trailing delimiter:
>
>
> $ echo "0 1 2^3 4 5^6 7 8" |
> while read -a array -d ^
> do echo $array
> done
> 0 3
> This behavior is counter-intuitive. It just throws away the
> last line
Nicolas Bonifas wrote:
>> > I don't know much about bash internals, but there is probably room for
>> > a huge performance improvement in speeding up the eval builtin.
>> > What do you think about it? Would it be a difficult task?
>>
>> It is more likely to be the command substitution that i
Nicolas Bonifas wrote:
> Thanks for your answer.
>
>> I assume you know that the speed issues most likely come from the
>> operating system's supporting functions like the fork() and exec*()
>> family members?
>
> How does it explain the speed difference between "echo `dircolors`"
> and "dircol
Bob Proulx wrote:
> This implies to me that a variable assignment forces subsequent
> commands to be external commands because the current environment is
> not affected. In your case above the external /usr/bin/time program
> is forced by the variable assignment requiring the environment
> variab
hawa wrote:
> Execuse me, would you give me a hand with a simple 'if' bash script?
> I want to make folders "00", "01",...,"20" and
> copy existing files file_00, file_01,,file_20 to each folder.
> Thank you very much.
>
>
>
> -
> for (( i = 1 ; i <= 20;
Chris F.A. Johnson wrote:
>> bash-3.2$ ./x/ < tab after x now adds slash
>>
>> Once the shell starts doing this, it keeps doing it. Restarting bash
>> solves the problem.
>
>I don't see that problem, and I'm using the same version of
>bash.
I can reproduce it, s
John Smith wrote:
> Ok, so maybe I should have just 'read the manual'
> ;)
>
> But it still confuses me somewhat, since AT&T's kornshell behaves
> differently.. I just downloaded the latest available version for Linux
> from the url mentioned below, and it does work in AT&T's ksh as I
> expected..
Verena Alishahi wrote:
> My first script (local.sh) reads a list of worksation cluster clients
> from hosts.inp in a loop and prints some output to output.txt. In the
> loop a second script (remote.sh) is called in a ssh instruction.
> remote.sh then writes some output to the same output.txt file,
Eduardo Sanz Garcia wrote:
> Description:*
>read builtin function keeps trailing white space when the default
> variable REPLY is used.
>This is specially bad when using the -e option because readline puts
> and extra space after pressing a the tab key to autocomplete a word.
>The IFS
Stephane Chazelas wrote:
> Note that bash didn't have to. POSIX allows a shell to accept
> any character in a function name, but it says one shouldn't use
> those in a POSIX script, which is different.
I'm not a POSIX expert, and this is the SUS, but I read:
| The format of a function definitio
Paul Jarc wrote:
>> | The function is named fname; the application shall ensure that it is a
>> | name (see the Base Definitions volume of IEEE Std 1003.1-2001, Section
>> | 3.230, Name).
>
> "The application" is the script, not the shell, so this is consistent
> with Stephane's statement.
Ok, g
Juliano F. Ravasi wrote:
> The second one is that it chops leading and trailing whitespace
> when you provide one variable for assignment, and not when you
> use the default $REPLY.
>
> I don't know if these are intended behavior, but it doesn't seem
> to be documented, leadin
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash
Thanks for your replies. I didn't want to raise a portability and POSIX
discussion. I know about that. I was referring to either a bug in the
Bash manual or a bug in the Bash code, nothing else.
Let's try to rephrase that a bit (the topic is not POSIX nor portability):
The Bash manual allows the
Roman Rakus wrote:
> I think in range [a-d] shouldn't be any upper char. These are 2
> different things. Collate orders and range match. Try to use glob and
> you will see difference.
> This is really not good behavior of bash.
This is and always has been locale-dependent. The collation sequence
Roman Rakus wrote:
> sequence, inclusive. In other locales, a range expression has
> unspecified behavior: strictly conforming applications shall not rely on
> whether the range expression is valid, or on the set of collating
> elements matched. A range expression shall be expressed as the startin
Chet Ramey wrote:
>> -
>> $ function name (echo)
>> bash: syntax error near unexpected token `echo'
>> -
> It's not. It's a shift/reduce conflict in the grammar. The default
> yacc/bison behavior is to choose the `function word () command'
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
> that my name is Richard, but that I might want to correct it.
> Alternativ
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} #Wish: start 3 back, read till
> ERROR #1 before the en
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
christophe malvasio wrote:
cbz (){ echo "why 'cbz' not a valid function name ?";}
bash: syntax error near unexpected token `('
It works for me. What does "alias cbz" say for you?
alias work
He wants to know if you probably have an alias named "cbz" defined, not
if your alias engine works.
Bob Proulx wrote:
Chet Ramey wrote:
Toralf Förster wrote:
I'm wondering why in the example (see below) the right side is
prefixed with a '\' wheras the left side is unchanged.
...
[EMAIL PROTECTED] ~ $ echo "1 2 3 4" | while read a b c d; do [[ "$a" =
"$b" || "$a"
Jan Schampera wrote:
= and == should make have difference in behaviour.
"should not show differences" *suh*
Sorry
J.
lexton wrote:
From what I read it is not good to use ls -la in the manner I use below.
Could I run this by just using the find command with additional arguments?
I still need to be able to print everything that the ls -la command gives me
GNU find has an -ls option IIRC, which produces output
Juergen Gohlke wrote:
Description:
If a command in $(...) contains a case-esac construction, the
bash prints a syntax error instead
of executing the code:
bash: syntax error near unexpected token `;;'
In case you have trouble with code you need, use this workaround:
x=$
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 until
there is at least one free "slot" available, where a slot is basically
a CPU core.
Example usage:
$ for ((n=0; n<100; n++)); do
my_experi
Hello,
is there something like a development snapshot for Bash 4 or is the code
"hidden" during development phase and I need to wait for the first release?
Thanks in advance,
Jan
--
This is my life - this is my net!
- Jan
grendelos wrote:
> So this is really bugging me. Why is [a-z] not case sensitive, but [A-Z] is?
> For example:
>
> # ls -l
> total 0
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xa
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xA
>
> # ls -l x[a-z]
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xa
> -rw-r--r-- 1
Chet Ramey wrote:
>> The case modification operators (for parameter expansion) seem to be
>> puzzled.
>>
>> Two things I don't understand:
>> - it seems to work word-wise (might be due to my misinterpretion of the
>> default pattern)
>
> It does work word-by-word, like the emacs-mode editing comm
Hello list!
Just a few thoughts, awaiting comments.
Currently, Bash 4 calls a fixed named function
command_not_found_handle() when a command is not found. The basic
approach (to have such a possibility) is great, but:
I can imagine that there may be more internal events to react on in
future. IM
Linda Walsh wrote:
> Am running an older bash version and this may be fixed (assuming it
> is a bug and I'm not confused...:-))
>
> bash version = 3.2.39(20)
>
> This works:
> 1)if [ -n "" -a 2 -gt 1 ] ; then echo one;fi
>
> This does not:
> 2)if [[ -n "" -a 2 -gt 1 ]] ; then echo on
Jan Schampera wrote:
> Hello list!
>
> Just a few thoughts, awaiting comments.
Heh. I wanted to raise a discussion about that issue, but it seems I
failed (or I'm the only one who cares) ;)
Jan
Hi.
In comp.unix.shell [1] somebody wondered about
IFS=: read a b <<< a:b; echo "'$a' '$b'"
ending up in
'a b' ''
Korn and Z seem to behave different. I see that across all my available
Bash versions. I remember the colon to be special in some way (was it
hostnames in a file path?), but I don
Stephane Chazelas wrote:
>> If this is intended behaviour, can you tell me why (it's gone with
>> quoting/escaping, of course)?
> [...]
>
> That would be a bug. Looking at the code, it takes a different
Good to know that I'm not completely mistaken - it smells buggy.
Only Chet knows for sure wh
coubeatczech wrote:
> c...@notas:~$ if [ -z $variable ]; then echo true; fi
> true
> c...@notas:~$
>
> Can anybody explain to me this behaviour? I would expect not any output in
> the last command...? The variable is set to zero and there is the condition
> is still true...?
http://bash-hackers.
tal396 wrote:
> there is any way to echo "aaa" or any msg in colors?
Start at
http://bash-hackers.org/wiki/doku.php/scripting/terminalcodes
and continue at whatever Google spits out for:
- bash colors
- terminal colors
- ANSI colors
- VT100 colors
J.
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
> how to sort by creation time
> -mike
Without looking there: It can't be documented, because there's no
gener
Mike Frysinger wrote:
>> Without looking there: It can't be documented, because there's no
>> general way to retrieve the creation time of a file.
>
> the op wasnt asking for the time, they were asking for the last created file.
>
> and the ls man page talks how to sort by ctime.
Yes, that's
Antonio Macchi wrote:
> commands like "ls --color" does not use terminfo capabilities...
>
> ...use instead fixed strings (without regards about TERMinal)
> is this a good (and safe) choice too?
IMHO not. Too many assumptions. GNU ls seems to always assume an ANSI
terminal, regardless which TER
Antonio Macchi wrote:
>>> commands like "ls --color" does not use terminfo capabilities...
>>
>>> ...use instead fixed strings (without regards about TERMinal)
>>> is this a good (and safe) choice too?
>>
>> IMHO not. Too many assumptions. GNU ls seems to always assume an ANSI
>> terminal, regardle
Tim Hatch wrote:
> Pilot:~/tmp/bash-4.0 tim$ coproc NAME ls
> [1] 18474
> Pilot:~/tmp/bash-4.0 tim$ ./bash: line 32: NAME: command not found
>
> [1]+ Exit 127coproc COPROC NAME ls
For some reason it expects a compound command on named coprocesses,
http://bash-ha
Mike Frysinger wrote:
> $ true
> $ echo '
>
> $ echo $?
> 258
>
> $ true
> $ echo '
>
> $ echo '
>
> $ echo $?
> 386
>
> that doesnt seem right to me :)
>
> the first test seems fine, and older versions of bash would set 258 for the
> second test (not sure if it's correct though), but the t
Mike Frysinger wrote:
> $ true
> $ echo '
>
> $ echo $?
> 258
>
> $ true
> $ echo '
>
> $ echo '
>
> $ echo $?
> 386
Just tested it, hopefully it's as easy as changing every
itos (last_command_exit_value)
to
itos (last_command_exit_value & 0xFF)
in subst.c (seems 2 times).
I don't provid
lehe wrote:
> Hi,
> I am trying to debug my shell script by bashdb. My script take as argument
> "--gdb", so I wrote
> bashdb myscript.sh --gdb
> However, this way it will produce error that bashdb:
> unrecognized option '--gdb'
>
> If I quote --gdb as
> bashdb myscript.sh '--gdb'
> th
OnTheEdge wrote:
> I'm trying to check for a directory and create it if it doesn't exist as
> follows:
>
> CommonDir="../common"
> if [ -d ${CommonDir} ]; then
>mkdir "${CommonDir}"
> fi
>
> It works from the command line, but my script doesn't seem to like it and I
> can't figure it out.
>
Cam Cope wrote:
> Combine tab completion with history: when you put ! at the beginning of a
> command and use tab completion, it displays history results
IMHO yet a new history expansion/editing/searching mechanism (there
already are a few) would bloat it even more.
But that's just my opinion.
J
Lennart Schultz wrote:
> In the construct
> cat file|while read line
> do
> done
> the content of any arry assignments in the loop dissapears leaving the loop:
This is logic, since every part of the pipe runs in an own subshell (the
first one runs in the "current shell"). This behaviour is also *
Dr. Werner Fink wrote:
>> This is not a bug, this is a consequence of Bash's design.
>
> Yep ... nevertheless a side mark: ksh can do ;)
Which is: A consequence of Korn's design ;-)
*waves the 80km to Nuremberg*
Jan
jida...@jidanni.org wrote:
> Might not be documented:
>
> $ cat q
> for i in : :; do :|: > x$((++a)); echo =$a=; done; ls x?; rm x?
> for i in : :; do : > x$((++b)); echo =$b=; done; ls x?; rm x?
> $ bash q
> ==
> ==
> x1
> =1=
> =2=
> x1 x2
>
>
I don't think it's specific to arithmetics.
I
1 - 100 of 167 matches
Mail list logo