word count not recognized as integer variable
ok, i have this command:
set mywordcount to do shell script "wc -l < MyFile.txt"
which gives me the number of words of a given txt
with display alert it reports me number 1 when there is one word, number 4 if there are 4 words, etc...
the problem comes when i want to do one action if the file has 1 word, another if it has more than 1...
when i write:
if mywordcount = 1 then
myactions here
else
otheractions here
end if
it doesn't do anything at all...
any ideas?
thanks!