|
From: Serge L. <fi...@in...> - 2005-11-08 09:14:40
|
Dear Heiko,
> I finally had a chance to look over the code and you're right, it is in 2
> places. I guess I was blind before.
> I'd say do to changes the way you proposed it (the bash version).
I've done it in another way. But it is very dirty yet - I haven't had time for
cleaning (really, I can't write a working "if" with 2 conditions (
logical AND) for some reason, so have to do it by adding return codes
:-\
while read line
do
f=`echo $line | cut -d' ' -f1 `
s=`echo $line | cut -d' ' -f2- `
# This is the logical AND :-(
ff=`test "$f" = "$s"`
ff=$?
ss=`eval test $s`
ss=$?
sum=`expr $ss + $ff`
if [ "$sum" -le "1" ]; then
echo $f
fi
done < ./perl-ext.1
I haven't investigated yet why something like this
if [ `test "$f" = "$s"` -a `eval test $s` ]; then
doesn't work.
--
Best regards,
Serge mailto:fi...@in...
|