* expert help sought [offtopic]
@ 2006-10-23 6:55 Helmut Jarausch
2006-10-23 12:04 ` Roman Neuhauser
0 siblings, 1 reply; 2+ messages in thread
From: Helmut Jarausch @ 2006-10-23 6:55 UTC (permalink / raw)
To: zsh-workers
Hi,
please help.
I am desparately in need for help on the following piece of
code within a 'configure' file.
It's run under '/bin/sh' which is a symlink to '/bin/bash'
but I known that real experts are reading this mailing list.
The following code fails in the 2nd line with
syntax error near unexpected token `('
../htmlwidget2/configure: line 4957: ` case `(ac_space=' '; set | grep ac_space) 2>&1` in'
here are the lines 4956 ff
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
I admit I don't really understand what's going on and even what's meant
to be going on.
Many thanks for your help,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: expert help sought [offtopic]
2006-10-23 6:55 expert help sought [offtopic] Helmut Jarausch
@ 2006-10-23 12:04 ` Roman Neuhauser
0 siblings, 0 replies; 2+ messages in thread
From: Roman Neuhauser @ 2006-10-23 12:04 UTC (permalink / raw)
To: Helmut Jarausch; +Cc: zsh-workers
# jarausch@igpm.rwth-aachen.de / 2006-10-23 08:55:47 +0200:
> I am desparately in need for help on the following piece of
> code within a 'configure' file.
> It's run under '/bin/sh' which is a symlink to '/bin/bash'
> but I known that real experts are reading this mailing list.
>
> The following code fails in the 2nd line with
> syntax error near unexpected token `('
> ../htmlwidget2/configure: line 4957: ` case `(ac_space=' '; set | grep ac_space) 2>&1` in'
My experience from porting FreeBSD's periodic(8) to RedHat suggests
that bash can't parse quite a bit of valid POSIX sh syntax, it loves
to get lost in parentheses and subshells. Try moving the subshell
into a separate statement.
> here are the lines 4956 ff
>
> (set) 2>&1 |
> case `(ac_space=' '; set | grep ac_space) 2>&1` in
> *ac_space=\ *)
> # `set' does not quote correctly, so add quotes (double-quote substitution
> # turns \\\\ into \\, and sed turns \\ into \).
> sed -n \
> -e "s/'/'\\\\''/g" \
> -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
> ;;
> *)
> # `set' quotes correctly as required by POSIX, so do not add quotes.
> sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
> ;;
> esac >> confcache
>
> I admit I don't really understand what's going on and even what's meant
> to be going on.
The code is meant to write config.cache.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-23 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-23 6:55 expert help sought [offtopic] Helmut Jarausch
2006-10-23 12:04 ` Roman Neuhauser
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).