hour, I want to send an email out to the
programmer. Any suggestions on the best way to do this?
if test -n $(find stampfile -mmin +60); then
alarm
fi
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
Mihai Barbos [EMAIL PROTECTED] writes:
When IFS is \n a single n at the end of a line is dropped.
IFS=\n
is equivalent to
IFS=n
If you want to set IFS to a single newline character use either
IFS=$'\n'
or
IFS=
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux
in implementation defined behaviour.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
into the buffer.
M-0 M-. (digit-argument yank-last-arg)
(2) delete-backward-argument, similar to delete-backward-word, but
should delete everything
to the left until the first white space.
C-w (unix-word-rubout)
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
Com MN PG P E B Consultant 3 [EMAIL PROTECTED] writes:
Wenn you now do echo $e, you should get the following output:
Try echo $e. Then read about Word Splitting in the Bash manual.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409
is parsed, just like shell meta characters resulting from
expansions are taken literally.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
Herculano Einloft [EMAIL PROTECTED] writes:
Em (02:25:11), Andreas Schwab escreveu:
Hey all,
$ if $(echo string /dev/null); then echo true; fi
true
This should be a syntax error
No, it is a perfectly valid command, syntactically. That the command
substitution expands
: unexpected end of file
That has already been fixed.
The offending lines (602 thru 607) from spencer1.script are:
The offending line is actually this:
status=`echo '-'| { ${GREP} -E -e 'a\' /dev/null 21 ; echo $?; }`
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products
This will run crond with SIGTERM set to SIG_IGN.
Fix:
Remove that sentence from the documentation?
It's not wrong, just incomplete. See
http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html for
the full details.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE
, otherwise it's readline that does the processing.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
Thomas Mellman [EMAIL PROTECTED] writes:
A recent new version of bash has changed the behavior of the
yank-last-arg command (_). Is there a way to revert to the old behavior?
histchars='!^ '
ie. disable the history comment character.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED
Andrew Kezys [EMAIL PROTECTED] writes:
Is there any command that will kill bash script-assosciated processes
in a kind way (ie ctrl-c) when the overall script is ended?
Use a trap on EXIT to do any cleanup you need.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux
at
the end, thus it differs from PATH lookup.
$ (PATH=/bin:; IFS=:; for x in $PATH; do echo $x; done) | wc -l
1
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276
the standard
output was redirected to DIRLIST.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
are
quoted.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
Dan Jacobson [EMAIL PROTECTED] writes:
$ cat t.sh
set -ex
! true #should stop here but doesn't!?!
RTFM.
`-e'
Exit immediately if ..., unless ... the command's
return status is being inverted using `!'.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE
substitution exits without consuming its input. If you are lucky
the first echo will be faster...
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
[EMAIL PROTECTED] writes:
$ echo $(
case a in
1) :;;
bash: syntax error near unexpected token `;;'
Use (1) instead.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
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 this bug has apparently already
been fixed.
Andreas.
--
Andreas Schwab
Karen Etheridge [EMAIL PROTECTED] writes:
Tilde expansion is not being performed when variables are being evaluated.
This is how it is supposed to be. Tilde expansion is performed before
parameter expansion, as described in the manual.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL
# Now I want to exit
exit
exit
logout
I would like to have a (interactive) command which does the final two
exits plus
a logout for me.
exec cleartool
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
___
Bug-bash mailing list
Bug
]*)\.tgz ]]'
Parens are special inside [[ ]], you need to quote them.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something
while in /usr/bin.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
on timing.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
of the value of parameter.
However, if I use echo ${f:-3} I don't get the expected result.
Read the second last sentence of the paragraph.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B
Richard Ray [EMAIL PROTECTED] writes:
Other than lsof is there a way to determine what file descriptors are
open?
$ (exec 4$n) 2/dev/null echo fd $n is open
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
Bruce Korb [EMAIL PROTECTED] writes:
$ echo tpdsrc/umod/nodesvr/test/[a-z]*
tpdsrc/umod/nodesvr/test/Makefile tpdsrc/umod/nodesvr/test/SCCS
tpdsrc/umod/node
What are the Makefile and SCCS entries doing on the line?
Please read the Bash FAQ, Question E9.
Andreas.
--
Andreas Schwab, SuSE
sequences C-\ . and C-\ , to
beginning-of-line.
but holding down Ctrl-. or , returns nothing.
As long as the terminal does not emit anything distinguishable for these
keys it won't change anything.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5
likely python has its own
implementation which gets it wrong.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely
concurrently. Process substitution does not have this problem.
while ...; do var=...; done (
generate-input-for-while
)
use $var
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B
Jeff Weber [EMAIL PROTECTED] writes:
enable job control,
$ set -m
and kill the entire backgrounded job from a second
non-interactive script?
You send the signal to the process group.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5
are orthogonal concepts.
If the process group of the background job could be returned or queried when
the background job is launched,
That's what $! is for.
Please let me know if I am misunderstanding, and thanks for your help.
Don't top post.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL
, but result is only int.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
I've never tried to source an autoconf configure
script on such a system.
If your ssize_t is smaller than 32 bits you'll have to worry about more
things than that.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
Matthew Woehlke [EMAIL PROTECTED] writes:
Hmm... well then I guess this is broken:
/usr/include/limits.h:#define SSIZE_MAX53248/* max single I/O
size, 52K */
The creativity of system designers always amazes me. :-(
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED
or just once:
moo , moo more
moo , more
Each variable assignment shall be expanded [...] prior to assigning the
value.
That means that each assignment is supposed to be expanded _and_ performed
in the same step while iterating over them.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED
to beginning-of-line.
Perfectly reproducible with bash 3.2.15 and TERM=xterm, see the attached
typescript. Note the bogus 20 ^H after the prompt is redrawn.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint
Chet Ramey [EMAIL PROTECTED] writes:
I simply cannot reproduce it on the systems I have available.
You need to be in a multibyte locale.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7
end of isearch, no matter how you leave
it.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
Chet Ramey [EMAIL PROTECTED] writes:
OK, I'm stumped.
Try again with PS1='\[\033[01;31m\]12345\[\033[01;34m\] \W \$\[\033[00m\] '.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53
[EMAIL PROTECTED] writes:
Description:
Result of ( false ) is 0, should be 1
This is not the case. The exit code is correct, but only simple commands
are causing the shell to exit with set -e. A subshell is not a simple
command.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL
between the braces.
If it would be done strictly textual, the resulting expansion would
actually be this:
$ echo (cat p.main.optional) p.main.extra)
which would be a syntax error.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg
Lucas Nussbaum [EMAIL PROTECTED] writes:
Well, no, because bash expands *parameters*, not words. So the prefix is
(cat /etc/, and the suffix is ).
But that would not be a *strict textual* expansion.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
Eric Blake [EMAIL PROTECTED] writes:
According to Andreas Schwab on 4/18/2007 4:01 AM:
Lucas Nussbaum [EMAIL PROTECTED] writes:
Well, no, because bash expands *parameters*, not words. So the prefix is
(cat /etc/, and the suffix is ).
But that would not be a *strict textual* expansion
likely mplayer is reading from stdin. You should redirect its input
to avoid that.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
, then it should display no error message in
the case of $((3+078));
This is a syntax error, so there is no sensible meaning attached to it. A
syntax error is something quite different than an undefined behaviour.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
. For example:
result=a*b;
if (result/a!=b) { report overflow; }
That won't work, since (signed integer) overflow is undefined in C. A
compiler is allowed to optimize the condition to false.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5
$SOMEFILE
This is available in sed version 4 and later.
Or use ed.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely
.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
___
Bug-bash mailing list
Poor Yorick [EMAIL PROTECTED] writes:
The syntax I'm currently using to access the last element of an array looks a
little evil:
arr=( one two three )
echo ${arr[$(([EMAIL PROTECTED]))]}
At least you can leave out the $((...)) construct, this is implicit.
Andreas.
--
Andreas Schwab, SuSE
you need to use eval.
eval interval$i='$(($date2 - $date1))'
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
Chet Ramey [EMAIL PROTECTED] writes:
Nic James Ferrier wrote:
Using bash 2.05, does anyone know of a way to get a trace of what's
happening inside a function?
Only by adding `set -x' inside the function body.
Or by upgrading to a shell that is not 6 years old. :-)
Andreas.
--
Andreas
was talking about expression
evaluation.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
-prefix= (ie. empty).
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different
error in expression (error token is 34)
Why do you think this is a bug? Two numbers separated by whitespace
cannot form a valid expression.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7
`!'. A trap on `ERR',
if set, is executed before the shell exits.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something
?
The variable is already substituted while the here-document is read.
Either quote the dollar sign, or use a quoted here-document.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756
''!'' whereas true
escaping would allow the more readable echo '\!'
$ echo \'\!\'
Since ! is an interactive only feature there is not much problem with
readability anyway.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Bernd Eggink [EMAIL PROTECTED] writes:
t0nedef schrieb:
echo Please enter a network name
read ESSID
if [ -n $ESSID ]
You probably meant:
if [ -z $ESSID ]
Really you want this:
if [ -z $ESSID ]
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
?
A setuid binary ignores LD_LIBRARY_PATH for security reasons.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely
Stephane Chazelas [EMAIL PROTECTED] writes:
That was on Linux, glibc 2.6.1.
Same.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
a' -
is enough for me to reproduce the problem.
Guess you have a buggy libc, then.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
Chet Ramey [EMAIL PROTECTED] writes:
What's needed is a portable interface like BSD's fpurge(3).
This is also available from glibc as __fpurge (likewise on Solaris).
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
.
Original - user:x:1000:100:user:/mnt/home:/bin/bash
what i want - user:x:1000:100:user:/mnt/user:/bin/bash
any suggestions? thanks in advance!
$ awk -F: '$6 == /mnt/home { $6 = /mnt/ $1 }' input output
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
. For your
locale that includes characters like ä and A. You should avoid the use
of ranges when not using the C locale.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3
Clark J. Wang [EMAIL PROTECTED] writes:
Anybody has any idea?
PS1='[\\$\\$=$$ \w] \$ '
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
Clark J. Wang [EMAIL PROTECTED] writes:
On 9/30/07, Andreas Schwab [EMAIL PROTECTED] wrote:
Clark J. Wang [EMAIL PROTECTED] writes:
Anybody has any idea?
PS1='[\\$\\$=$$ \w] \$ '
Sure it works but I don't think this is the way it should be. In this way,
to include `\\' in the prompt
with anything.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
: `rm -f /tmp/file.+([0-9])'
Can you provide insight into this.
shopt changes the shell grammar. When it's not executed the modified
grammar is not accepted.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
AnMaster [EMAIL PROTECTED] writes:
Repeat-By:
$ .foo-bar() { echo test; }
$ .foo-bar
test
$ unset .foo-bar
bash: unset: `.foo-bar': not a valid identifier
Use unset -f.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
Michael Potter [EMAIL PROTECTED] writes:
countparms ${Arguments[*]}
Use [EMAIL PROTECTED] instead (including the quotes). See node Arrays
in the Bash docs.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
identifier
Use unset -f. (And don't work as root.)
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
Patrick Nagelschmidt [EMAIL PROTECTED] writes:
++ echo '1197919330 - (1197919330 % 86400) - 86400'
++ bc -i
This is bogus. Why are you forcing bc in interactive mode?
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
that way, which is consistent with ksh.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
[EMAIL PROTECTED] writes:
set -o ignoreeof on
That's the same as
$ set -o ignoreeof
$ set on
As such it works as documented.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B
filename expansion on the result of
dircolors, which is significant. For example, note the time difference
between echo $LS_COLORS and echo $LS_COLORS.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA
Nicolas [EMAIL PROTECTED] writes:
What is the role of xmbsrtowcs? Why doesn't mbsrtowcs convert 0x5c to U0x5c?
SHIFT-JIS defines 0x5c to be the Yen sign U00A5.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
+698,7 @@ add_char:
stupidly_hack_special_variables (list-word-word);
if (var)
VUNSETATTR (var, att_invisible);
+ FREE (t2);
xfree (orig_input_string);
return (retval);
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409
John Smith [EMAIL PROTECTED] writes:
But I guess that you would consider that a bug in ksh ?
POSIX allows both behaviours.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B
the first one does that I'm not sure, but it's the last one you want.
Both the first and the third example calls echo only once, but in the
first example the argument to echo is word splitted. In the second
example the word splitting is done on the expansion of `foo`.
Andreas.
--
Andreas Schwab
in turn, and the expansion is the resultant list.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
a function definition is itself a
compound command.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
).
POSIX allows function to be treated as a reserved word, even if it does
not attach any meaning to it.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276
). Is
all that documented (I couldn't find it via a quick scan of the
man page)?
$@ expands to the positional parameters, which $0 is not (it is a
special parameter). Since index 0 does not exist, $1 is the first
counted parameter in the expansion.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL
to trojan horses that the user might be
SUSv3 trying to avoid by leaving dot out of PATH .
Ironically, the example just before the rationale depends exactly on
finding the file in the current directory.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH
/009695399/utilities/xcu_chap02.html#tag_02_10_02.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
there!
[EMAIL PROTECTED]:~ echo hi there\!
hi there!
In which way is that wrong?
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something
Matthew A. R. Sherian [EMAIL PROTECTED] writes:
I have seen, upon occasion, that my ridiculously long HISTSIZE (10)
Do you have set HISTFILESIZE too?
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key
, not when part of an expansion. You can get
around that rule by using eval, which rereads the argument as input to
the shell.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756
in the caller, before executing the
shell.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
or xterm on MacOS X. MacOS X
aterm gives some weird redisplays, but only when the second numeric
argument is 10, and the final display is (usually) right. I don't
see your results.
Set PS1='\[\e[1m\]xx\$\[\e[m\] ' and retry.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED
. Eventually readline
miscounts the four invisible characters at the end of the prompt.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
on entry to a non-interactive shell cannot
be trapped or reset, although no error need be reported when
attempting to do so.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B
.
This is what bash is reporting.
Andreas.
--
Andreas Schwab, SuSE Labs, sch...@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
executing.
Better yet: set -x to get an accurate view of the command, including
quoting.
Andreas.
--
Andreas Schwab, SuSE Labs, sch...@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now
--prefix=... $(myflags)
Andreas.
--
Andreas Schwab, SuSE Labs, sch...@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something completely different.
followed by
a compound-command can also be interpreted as a simple-command where
NAME is the first word of it.
Andreas.
--
Andreas Schwab, SuSE Labs, sch...@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B
1 - 100 of 604 matches
Mail list logo