Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 May 1997 10:55:40 +0200 (MET DST)
From:      Zahemszky Gabor <zgabor@CoDe.hu>
To:        freebsd-questions@freebsd.org (FreeBSD questions)
Cc:        un_x@anchorage.net
Subject:   Re: Xterm/shell diff
Message-ID:  <199705260855.KAA00750@CoDe.hu>
In-Reply-To: <Pine.BSF.3.95q.970524163406.20368A-100000@aak.anchorage.net> from Steve Howe at "May 24, 97 04:39:24 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> is there a good reason an Xterm and ttyv* window should behave
> differently?  
> 
>  if [ "`expr $j : '.*\.\(.*\)'`" = gz ]; then echo hi!; fi
> 
> if i remove the double-quotes from the test, an Xterm gives me the
> error "]: syntax error", but a ttyv* doesn't complain.
> 
> what's going on?

Maybe pilot error.  I've 2.1.5, and tried it on ttyv1 under sh, and on an
xterm under sh.  Nothing different.  So:
1) what's value of j
2) was it the correct error message?  (I've got [: syntax error
+ expr: syntax error only when I made j unset)

Gabor
--
#!/bin/ksh
Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705260855.KAA00750>