On 26 March 2016 at 01:28, Val Krem wrote:
>
> is it possible to combine the two scripts in one so that I can define the
> varietals at one spot. It would be less prone to error.
Yes - you can have a script with a "case" and hard link to another
name (you can symlink but they're not as efficie
See any problem here?
#!/bin/bash
# [PL] Porownuje dwie tablice, zwraca prawde/falsz.
set -x
A=( "$1" )
B=( "$2" )
EQUAL=0
if [ ${#A[@]} -eq ${#B[@]} ]; then
for id in `seq 0 2 $[ ${#A[@]} - 2 ]`; do
if [ "${A[ $id ]}" == "${B[ $id ]}" ]; then
EQUAL=1
else
EQUAL=0
break
fi
done
fi
echo $