Hi,
I am trying to use awk in bash and have no idea why this not works
for fl in `find -name "*.jpg"`;do
echo $fl;
eval $x=\"$(awk -v name=$fl 'BEGIN{print match(name,/less/)}')\";
echo $x;
done
I would use $x differently afterwards, depending on result ($x = 0 or not) but first to figure out what is wrong here.
p.
I am trying to use awk in bash and have no idea why this not works
for fl in `find -name "*.jpg"`;do
echo $fl;
eval $x=\"$(awk -v name=$fl 'BEGIN{print match(name,/less/)}')\";
echo $x;
done
I would use $x differently afterwards, depending on result ($x = 0 or not) but first to figure out what is wrong here.
p.