So this is what the script I am running looks like:
$word_new=catdog12
while [$word_new -le catdog*]
do
x=1
$word_new=`ls -l $1* | cut -d"." -f$x`
x=$((x+1))
done
my question is, does the asterisks in this loop also includes stuff after catdog when trying to match $word_new with? Like there is stuff after catdog like numbers and and there are several catdog files in the directory. $word_new=catdog12 and the loop is going to keep going until $word_new equals catdog*
If it does what would be a better solution?
PS - I know its hard to understand because its hard for me to explain my problem haha