4 Replies Latest reply: May 12, 2012 4:10 PM by BobHarris
personal_username Level 1 (0 points)

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


otheractions here

end if

it doesn't do anything at all...

any ideas?