Alan Mackenzie wrote:
Ah. I've got $LANG set to en_GB. Who did this? How dare they!
OK, I did this myself, somehow, presumably during installation of
Debian Sarge.
On Debian:
sudo dpkg-reconfigure locales
Why didn't they tell me I was messing up my shell? Why do I feel
so stupid?
Stepan Koltsov wrote:
set -e
( cd some-dir make )
...
Most readers (and writers) expect script to fail if make failed. So
I think that outer bash should exit with error on (false) :-)
Of course, script can be rewritten as
( cd some-dir make ) || false
Of course the script can also be
Eric Blake wrote:
According Alan Mackenzie:
| % ls [A-Z]*
| . Sadly, ls ignores my intentions and undiscerningly prints a list of
| all files whose names begin with a letter, big or small.
Actually, it follows your (unintended) directions, thanks to your current
locale, which does a
Matthew_S wrote:
With the 'while read line', it appears that I don't need to keep track of
the line numbers. In fact this below does exactly what I need it to do;
Good.
cat $File | # Supply input from a file
Search the web for useless use of cat. Your use of it here is
useless.
But it
Roman Rumisek wrote:
$ echo $((096 4))
bash: 096 4: syntax error: operand expected (error token is 096 4)
$ echo $((0096 4))
bash: 0096: value too great for base (error token is 0096)
In both of those the 9 is not a valid octal component. You are
running into octal conversion problems.
Patrick Nagelschmidt wrote:
The script below fails on my box with the following output:
1197676800
date: invalid date `1970-01-01 \033[?1034h1197676800 sec'
So for some reason the value passed to date got a nasty prefix.
I cannot recreate the problem.
James McMurray wrote:
How can I recursively move through a directory tree and call a function in
each folder?
Mike Stroyan recently posted an example doing exactly this:
http://lists.gnu.org/archive/html/bug-bash/2007-11/msg00080.html
Bob
unset strangely rejects certain function names eg fu~
$ function fun(){ echo running fun;}
$ function fu~(){ echo running fu~;}
$ fun
running fun
$ fu~
running fu~
$ unset fun
$ unset fu~
bash:
cga2000 wrote:
I was wondering if there is any way I can convince netstat to return
its output to bash variables for additional processing.
Do you mean like this?
rxcnt=$(netstat -ni | awk '/^eth0/{print$4}')
Pretty simple logic:
Do forever:
Call netstat to obtain RX TX byte
Linda Walsh wrote:
Would it be a bad thing to set mail-list software to automatically
default to the list as the 'default' response, and the user would
have to address an email, manually, to not respond to the list?
If there were a good mail header to use then it would be a good thing.
But
Jesse Molina wrote:
Netcat has strange issues about wanting stdin -- it won't run
backgrounded without being fed tail -f /dev/null. I wonder if it
isn't the problem here. I had discounted it since I redirected both
stdin and stdout to the logfile.
I have had problems with netcat before. As
Blaine Simpson wrote:
exit doesn't exit the current shell when inside of PIPED read blocks,
yet everything works find if the input comes from redirection.
This is because pipes operate in subshells and the exit applies to the
subshell. Please see the bash FAQ question E4 for more
Blaine Simpson wrote:
read silently fails when stdin is piped to it. -u switch does
not help. Redirection works fine.
Same as the other problem with exit in a pipeline. Pipelines operate
in subshells. Environment variables are local to the process. Please
see question E4 in the bash
Andreas Schwab wrote:
Bob Proulx writes:
Since $PWD is a bash specific feature
It isn't.
would still tend to use $(pwd) because that works both in bash and in
POSIX shells (would be okay with #!/bin/sh).
$PWD works in every POSIX shell.
Oh! I had it in my head
Mike Stroyan wrote:
龙海涛 wrote:
Bob Proulx wrote:
test=$(pwd)
echo $test
By the way, the variable $PWD has the same current directory value
as $(pwd) .
Yes, you have a point, but... Even though this is a bash list I still
prefer to use standard constructs when possible
龙海涛 wrote:
i want to store the current working dir to a variable, i write
The most common way to save the present working directory to a
variable would be to use the $(...) form.
test=$(pwd)
echo $test
Try that.
Bob
[EMAIL PROTECTED] wrote:
A shell script which worked perfectly using 1.14.7(1) fails to execute
properly using 2.05a.0(1)-release. The purpose of the script is to parse
a session log file found in each user's home directory, and determine
whether a record belonging to some other user
Christian Schubert wrote:
PS1='\e[32m$\e[m'
Non-printing characters need to be bracked with \[...\] to inform bash
that they do not display. Please see the bash documentation in the
section on PROMPTING.
\[ begin a sequence of non-printing characters, which could
[EMAIL PROTECTED] wrote:
When trying to produce an exclamation mark (!) inside a quoted
string is behaving differently from expected. I cannot see a
way of producing an exclamation mark inside a doubly-quoted
() string in the bash prompt.
You are correct. However that
Ken Failbus wrote:
When I specify on command-line bash -n myscript name. 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.
Unfortunately what you are describing is not a syntax error. It is
perfectly
Ken Failbus wrote:
I have a script that when run in background and while it's running
hitting a carriage return causes it's to completely stop the script and
the terminal in which it's running disappears. It seems as though it
received a interrupt signal. Is there some kind of a job control or
Chet Ramey wrote:
I've received a bug report noting that the `block size' the ulimit builtin
is using (the multiplier applied to the -f and -c options) is 1024, where
the POSIX standard and historical sh usage specify 512.
I'm considering changing the default block size for the next version.
Felipe Nascimento wrote:
Subject: Bugs?!
Please give a meaningful error message when reporting a bug. If
everyone reported every bug with bug then there would really only be
one bug in the entire world. We fixed Bugs already. Say something
meaningful such as bash foo does bar instead of zap
duff wrote:
What does this ` character do in the command line?
Command Substitution. And I was a little surprised to see that when I
looked for that character in the man page that it did not appear
anywhere within it in the Debian formatting of the manual. It appears
that there is a formatting
caudio wrote:
Hi everybody! I have recently had a problem trying to make an ssh
runn inside a loop.
Your question is really not about a bug in bash. It would be more
appropriate for a general shell script discussion list. It is
somewhat off-topic here.
Having said that, I can't resist
Rajeswar N wrote:
IF for some reason task n fails, I am not able to re-start the script
from the nth step.
The shell is a programming language. It will do exactly what you
program it to do. It will do nothing more and nothing less.
IS there a lable available in ksh?
There are no labels
Stephane Chazelas wrote:
However note that the file pointed to by the BASH_ENV
environment variable is sourced even by non-interactive shells
And while that feature can be useful it can also break working
scripts. Therefore I try to ignore that this feature exists and hope
that no one (ab)uses
The Wanderer wrote:
Quite some time and several varyingly-significant updates of bash
ago, I was able to perform history expansion on multi-word commands.
At present and for some while now, it instead expands to
ls /tmp/ /h
This is also what csh does in this situation too. This type of
_Biff wrote:
I am having an issue figuring out how to input a value that has special
chars and using that var as follows:
input value(no quotes):
name:phone
Script:
location='${USERINFO}'
The quotes are part of the actual script? That does not make sense in
that particular context.
Serge Vakulenko wrote:
What do you think about extending bash functionality with visual
two-panel file browser?
Here is a new project to implement this: http://bashc.wiki.sourceforge.net/
Critique and suggestions are welcome.
I think it looks very much like midnight commander and other file
Chet Ramey wrote:
No, there's no way to wait for it.
Hmm... That does make it very difficult to actually use correctly.
If there are any practical uses I am missing seeing them. Any useful
examples? Is that enough of a misfeature to qualify as a bug?
Bob
Michael Williams wrote:
if [-d $i]
That is not the correct syntax. The [ is a shell builtin, not a shell
metacharacter. Shell metacharacters do not need to be separated by
whitespace but the test program needs to be apart or it won't be
parsed right. That is why you are seeing [-d not
chitti wrote:
I need to seperate the UDP and TCP ports from the /etc/services files.
any pointers or help on scripting this in bash would be helpful
Open ended questions such as that are not the greatest way to get
going. It is better if you read one of the many tutorials and howtos
that are
I am confused by the order of operations of this following:
$ { echo hello world | tee (md5sum 12) ;} ; echo goodbye
hello world
goodbye
$ 6f5902ac237024bdd0c176cb93063dc4 -
Shouldn't bash wait for the subprocess finish before the next command
is invoked? I did not expect the (list) to
marquis wrote:
I'm looking for an exisiting script, or a command to help w/
processing files by date. I have a test website and need to
upload only the files that have been changed since the last
upload. I'm thinking of creating a file list and the date of the
last upload. if the
SciFi wrote:
Bob Proulx wrote:
$ strings bash | grep profile
noprofile
/etc/profile
~/.profile
~/.bash_profile
That looks good at least.
$ sudo chmod 0644 /etc/profile
I *know* that!
What I was striving for was to get at all the problems to be sure it
is executable if need
warnockm wrote:
I'm looking for an exisiting script, or a command to help w/ processing files
by date. I have a test website and need to upload only the files that have
been changed since the last upload.
This sounds like the perfect application for use of rsync.
I'm thinking of creating a
maryatthelake wrote:
I am using voice recognition software (Dragon Naturally Speaking) with the
bash shell. I have a command that double clicks on a filename then copies it
and does a cd to it on the command line. Of course, the command doesn't
work when there is a space in the filename
SciFi wrote:
Bob Proulx wrote:
Is this a self-compiled binary?
Yes, I do not use pkg-mgrs such as fink or macports, maybe only for
clues when a regular build bombs (straight from the tarballs).
If you have self compiled it then it should be possible to debug it.
What is the value
Paul Jarc wrote:
Jérémy Hervé wrote:
-bash: /usr/sbin/httpd: No such file or directory
hash -r will fix that. See help hash and man bash for details.
There is also checkhash.
shopt -s checkhash
In man bash:
checkhash
If set, bash checks that a command found in the
Please keep replies to the mailing list so that others can participate
in the discussion and any answers will be archived. Thanks.
John Tromp wrote:
That is perfectly clear!
However, the question remains: what is the rationale of that specification?
I was not part of the decision and can
John Tromp wrote:
echo hi\! still shows the backslash
Thank you for your report. However this is intended behavior. And it
is also documented! :-)
man bash
Enclosing characters in double quotes preserves the literal value of
all characters within the quotes, with the exception
Timothee wrote:
as said in the title, I have suppress all comas in a lot of text files
located in the same directory, all having the same name but with a different
number at the end (year1, year2, year3, ...).
I'm sure this can be done very rapidly in bash but have no idea of how to
write
Jan Schampera wrote:
Parameters inside arithmetic contexts like $(()) and (()) break
the expression parsing when they contain a newline
Thank you for your bug report.
$ foo=12
34
$ echo $((foo))
bash: 12
34: syntax error in
[EMAIL PROTECTED] wrote:
Hi Bob, a quick question if I could as I am trying to determine if my bash
thinks it has a tty device or not and therefore is interactive or not.
Internally bash will use the libc isatty(3) routine to determine if
the input/output files are tty devices. In the shell
Jan Schampera wrote:
Well, I guess intuitively expected that it evaluates to 0, like for
example:
$ test=string
$ echo $((test))
0
In that case it is like the 'atoi(3)' routine. A non-numeric has no
number value and is evaluated to be zero. A single zero is a valid
arithmetic expression.
bash_user wrote:
That is correct.
I would like to understand what triggers the shell to re-evaluate
PROMPT_COMMAND every time
directory / clock change occur.
The documentation for bash says:
PROMPT_COMMAND
If set, the value is executed as a command prior to issuing
Matthew Woehlke wrote:
Bob Proulx wrote:
You would probably need q\n in order to get the data flushed to the
subprocess. This is probably a stdio buffering issue. When the stdio
library determines that the output is not a tty then the output is
buffered into large blocks for performance
Miguel Ángel wrote:
Evaluating expressions like:
[ true -a false ] ; echo $?
always returns 0 (true), doesn't mind if I change true for false or
viceversa.
In the case of the test operator (aka '[ expr ]') use of true and
false as you have done are strings and not boolean expressions and
not
Matthew_S wrote:
interval$i=$(($date2 - $date1)) #1st 2nd errors
...
I'm getting the errors;
./file.sh: line x: intervala=1: command not found
./file.sh: line x: intervalb=1: command not found
./file.sh: line x: - : syntax error: operand expected (error token is )
[EMAIL PROTECTED] wrote:
In this site http://www.istf.com.br/vb/showthread.php?t=11153 (pt_BR)
there is a command and an explanation of as this simple command : (){
:|: };: can crash the Linux completely. It would be interesting you
will correct this.
You are reporting what is well
Jeff Chua wrote:
With bash 3.1.17(4)-release
# [[ abcd =~ ^a ]]; echo $?
0
With bash 3.2.17(3)-release
# [[ abcd =~ ^a ]]; echo $? # is this a bug???
1
# [[ abcd =~ ^a ]]; echo $?
0
Is this a bug?
The behavior has been intentionally changed.
Please see Bash FAQ item E14.
Bob
Chet Ramey wrote:
If you want to force the history file to be completely rewritten, you
can use `history -w' at shell exit to rewrite it. There is, unfortunately,
currently no easy way to force the `rewrite-at-exit' behavior.
Could a shell trap be used to do this?
trap 'history -w' EXIT
I
Matthew Woehlke wrote:
$ sed -e '5d' -e '/FOO/d' -e '5,7d' myfile mynewfile
Note that redirecting output to an input file is not recommended (you
might end up truncating the file, for example).
You almost certainly would.
If you need to replace the file, it is best to write to a
Richard Neill wrote:
b)Consistent with other cases, where bash does give warnings. For example:
$ X=$((3+078))
bash: 3+078: value too great for base (error token is 078)
$ echo $?
1
That is not really a comparable case. The problem there is that the
leading zero specifies an octal
[EMAIL PROTECTED] wrote:
The expansion of the filename pattern *.[a-z]* matches files with
upper case after the period, not just lower case, even though the
nocaseglob is set to off, when the LANG variable is set to
en_US.UTF-8.
Yes. What you are seeing is not a bug
Francesco Montorsi wrote:
I think you all have encountered this: do a cat somefile where
somefile is a text file _without_ a final newline. You'll see the
prompt is printed both at the end of the text printed by 'cat' and then,
also at the beginning of that same line.
I cannot reproduce
[EMAIL PROTECTED] wrote:
Please see mandriva bugreport for a more detailed explanation
with examples at: http://qa.mandriva.com/show_bug.cgi?id=21708
The problem is that bash always executes the command at the prompt
when closing the terminal window.
You may be
Matthew Woehlke wrote:
Apparently selectively shadowing libc is non-trivial... any
suggestions/hints?
Not so much non-trivial as perhaps non-obvious. The dynamic loader is
part of libc and so by the time the program tries to use
LD_LIBRARY_PATH it is already too late because it has already
/Command_002dLine-Interfaces.html#Command_002dLine-Interfaces
Here is a simple but complete example. This produces output suitable
to generate the man page with help2man.
Enjoy,
Bob
#!/bin/sh
#
# A sample program illustrating shell option parsing.
#
# Copyright (C) 2007 by Bob Proulx [EMAIL PROTECTED
Matthew Woehlke wrote:
Бојан Ландекић wrote:
Is it possible to put bash on some portable media and use it on a
system that is bash-less without worrying about dependencies?
Not unless you build it statically, it isn't. :-) Although I think if
you build bash it gives you all the libraries
Aharon Robbins wrote:
Chet Ramey wrote:
You need to force the issue. Add
export LC_COLLATE=C
to your startup files.
I prefer to use an even bigger hammer:
export LC_ALL=C
That is a big hammer! But today I prefer to use UTF-8 character sets
and the associated machinery. It is
Bruce Korb wrote:
This cannot have been overseen, so perhaps I am not understanding
how nocaseglob is supposed to work:
I think you have the nocaseglob right. I think this is a variable set
but not exported problem. Just guessing though.
$ bash --version
GNU bash, version 3.1.17(1)-release
Matthew Woehlke wrote:
Bob Proulx wrote:
Traditional Unix machines used a csh script /usr/bin/which to search a
defined set of system paths. Newer ksh used 'whence'. Bash uses 'type'.
XSI extensions to POSIX require 'command -v'. Debian implemented
'which' as a bash shell script
Bojan Land wrote:
Bob Proulx wrote:
This is possible when it has been cached by bash and then the
executable is either moved from its original location or a new
executable appears earlier in PATH.
I did not move the executable.
Right. or a new executable appears earlier in PATH. I
I have learned a lot from your reply, and yes some of what you wrote
explains this as not being a bug; after a reboot I cannot reproduce
these results.
You should not need to reboot to clear a single shell process hash
cache. Simply starting a fresh shell, such as opening a new window,
would
Bojan Land wrote:
Is what I am describing a bug, or lack of understanding?
I am not sure. I read through your posting very carefully but was not
quite sure what you were asking. Could we on the mailing list have
more information?
There are three examples here. If executable file is in cwd
Daniel Webb wrote:
First off, please CC me on any replies because there are no instructions on
the FSF bash page (http://directory.fsf.org/bash.html) to tell me how to
subscribe to this list.
All of the mailing lists accept subscription commands by mail to the
-request address. The following
Ramprasad B wrote:
I need a help in calling external programs from shell script.
A shell script and specifically a bash script automically calls
external programs.
For example a java class or methods and c functions from a shell script.
Those programs need to be turned into a standalone
Uno Engborg wrote:
In Gnome, MacOS-X, and in Kubuntu KDE, you can make a file hidden from
the desktop environment by listing it in a file called .hidden.
The .hidden file resides in the same directory as the files to be
hidden, and lists the files to be hidden as one file/line.
Files hidden
mrkiwi wrote:
I am trying to write the code for this psudo code;
function askYN{
echo continue?
read the response into $response
}
Can you show your actual askYN function? You also need to screen all
user input for validity.
This is what i have so far, but it complains (i think)
Bob Proulx wrote:
This is probably not a an optimal solution because this is late night
time for me but this works:
eval vi $(grep -l PATTERN * | sed 's/ /\\ /')
This also works.
find . -exec grep -q PATTERN {} \; -exec vi {} \;
Bob
___
Bug
[EMAIL PROTECTED] wrote:
But, given that find is clever enough to assemble arguments containing
spaces into an arglist and feeding them to vi, why can't bash?
I find the 'find' solution to be one that I am more attracted to but
if you put it that way I will note that bash has the capabilities.
[EMAIL PROTECTED] wrote:
This is probably not a an optimal solution because this is late night
time for me but this works:
eval vi $(grep -l PATTERN * | sed 's/ /\\ /')
Yes, that works.
But surely such a grotesque syntax is not really in the spirit
of concise unix expressions.
mwoehlke wrote:
Anyone have any clever, VERY reliable tricks for detecting if the
current shell is bash? The obvious way is '[ -n $BASH ]', but in the
I would probably avoid the clever and go with the simple to understand
and unlikely to be accidentally invoked method.
test
ozwolverine wrote:
I hava a cron that generates a backup with a name like:
backup_jboss-4.0.3_09102006.tar.gz, it gets generated once a week, every
friday, I need that after the cron creates the new weekly backup to delete
the others and I want just to leave in the system the last one, how
Chet Ramey wrote:
Com MN PG P E B Consultant 3 wrote:
monitest.sh: line 9: 3486 Terminatedtail -f foo bar
(1) Monitor was not set
...
Not really. If a pipeline in a shell script is killed by a
signal other than SIGINT or SIGPIPE, the shell reports it. People
generally want to know
[EMAIL PROTECTED] wrote:
Bash Version: 2.05b
Patch Level: 0
...
When trying to run a while loop, bash seldom segfaults. The
behavior is not constant. The machine is in fact an AMD 64x2, here
is a extract from dmesg:
...
[EMAIL PROTECTED] ~]$ while : ; do true ;done
Segmentation
Mårten Segerkvist wrote:
command1
%1 command2
%2 command3
(where the second command line awaits the execution of the first etc.)
In a script you can grab the process id of the last background job
with $!. Then you can wait for that job id.
command
wait $! command2
wait $!
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
856-256-4979
=
-Original Message-
From: Bob Proulx [mailto:[EMAIL PROTECTED]
Sent: Friday, July 14, 2006 1:32 AM
To: Cheltenham, Christopher J
Cc: bug-bash@gnu.org
Subject: Re: bash 3.1 on Solaris 9
Stephane Chazelas wrote:
$0 will always contain the file path, unless the script was
started as:
bash script.sh
And there's no script.sh in the current directory (in which case
sh/bash will have looked up script.sh in $PATH).
Of course using command as you have done will work for bash.
Martin Wheatley wrote:
You also asked ...
Is there an example of
another command shell which handles this situation in a different and
possibly better way?
/bin/sh handles the situation correctly (in our opinion)
On my system /bin/sh is a symlink to /bin/bash and behaves similarly.
Miek Gieben wrote:
http://www.miek.nl/projects/rdup/svn/trunk/sh-tools/mirror.sh.in
Chet Ramey wrote:
The root cause is probably that something is consuming all of the
input from stdin (the pipe) on FreeBSD and not on Linux. I suspect
the call to `head'. The two implementations
Martin Wheatley wrote:
Description:
Bash may inadvertently execute a command that the user did not
anticipate if STDIN is closed.
The shell reads data from the input. It then parses the input into
commands and executes them. If this is not what you want then you
must avoid closing the
Chet Ramey wrote:
Marvin Greenberg wrote:
while read f; do echo $f; done ~/.bash_history
But, this fails:
while read f; do echo $f; done (cat ~/.bash_history)
bash: syntax error near unexpected token `(cat ~/.bash_history)
That's not a redirection; it's
Zackary Deems wrote:
echo blah /tmp/blah
ln -s /tmp/blah /tmp/blah.link
if [[ -f /tmp/blah.link ]]
then
echo /tmp/blah.link is a regular file
else
echo /tmp/blah.link is NOT a regular file
fi
Thank you for the very nice and concise test case.
links now match for both links and
Chet Ramey wrote:
Peter Volkov wrote:
Please CC my email to answers as I'm not subscribed to the list.
$ [[ string =~ [a-z] ]] echo something
something
...
The real question is whether or not quoting the pattern should work as
it does with other [[ pattern matching operators, which is
Chet Ramey wrote:
It seems reasonable that quoting any part of the rhs to the =~
operator should cause it to behave in the same manner.
Since the arguments to [[ don't undergo any of the expansions that
require quoting to protect them, there's no reason for =~ to act
differently than the
Miguel Luis wrote:
- I'm Using Ubuntu Dapper Drake.
I don't believe that Ubuntu has released Dapper Drake yet. Therefore
what you have must be a release candidate for Dapper Drake.
[EMAIL PROTECTED]:~/Desktop$
- I just ran my cesar's program like this:
[EMAIL PROTECTED]:~/Desktop$ echo
OULBOUB Lhassan Ext OF/UNPS wrote:
I have an server with GNU/Linux 2.4.21-20.0.1 with package bash
bash-2.05b-29.0.3
When i worked with bash i have a 100% CPU
Could you tell me why ?
You presented very little information to work with. It will not be
possible to suggest much.
Try 'top' to
Charlie Bennett wrote:
Is this expected behavior?
[EMAIL PROTECTED] .ssh]# [ -f ]
[EMAIL PROTECTED] .ssh]# echo $?
0
Yes. That is expected behavior. With one argument the return code is
true if the string is non-zero in length. The case covered is this
case:
if [ $variable ]; then
Charlie Bennett wrote:
H. I sat on that blasted committee.
:-)
I'll file a corrigendum or whatever it's called. This should at
least be called out in the rationale.
No biggie. I'll just make sure I quote all of my args.
Yes, because test and [ were external commands when the API
Chet Ramey wrote:
Bob Proulx wrote:
As an alternative, you could use the [[ ... ]] syntax. That is the
newer syntax, covered in POSIX too so should be portable to POSIX
systems, but is always a built-in to the shell.
POSIX declined to standardize [[...]]. It just happens to appear
Thierry EXCOFFIER wrote:
LINES and COLUMNS variables are not exported,
so applications using these variables can not
find the screen size.
The LINES and COLUMNS variables are an *override* to applications. It
is not an application's primary method of getting the size
Yuri Karlsbrun wrote:
I, probably, need bash-help mailing list, but I could not find it.
Here is the bash script fragment:
LOG_FILE=./logfile
...
$LOG_FILE
I supposed that the statement above redirects stdout to the logfile.
But the following 'echo' statement prints on the screen. The
Mike Frysinger wrote:
bash -c 'echo a-{b}-c'
a-{b}-c
seems to me current behavior is inconsistent
Yes. That is inconsistent with csh.
csh -c 'echo a-{b}-c'
a-b-c
It is related to brace expansion but seems like a different case than
the original poster's bug report. In the original
Vincent Lefevre wrote:
An EXIT trap is executed when the process is killed, e.g. by the
SIGTERM signal, which breaks traditional sh compatibility
A lot of POSIX required behavior breaks traditional Bourne sh
compatibility.
and, IMHO, is not POSIX-compliant (see the explanations in the
Paul Jarc wrote:
[EMAIL PROTECTED] wrote:
a exit inside a loop inside a pipe exits's the loop and not the
script. may bee a error.
This is normal. Each element of a pipeline is run in a child process.
Yes. Another more clear way of seeing this in the example would be
something
XIAO Gang wrote:
#! /bin/bash
if true; then
alias myls=ls
alias -p
myls
fi
myls
In a script it is considered better form to use shell functions than
to use aliases. Aliases are an old csh feature. Functions generally
provide that functionality in a better fashion.
#!/bin/bash
if
301 - 400 of 409 matches
Mail list logo