[pmwiki-users] WikiSh - check string length

adam overton a at plus1plus1plus.org
Sun Jun 8 04:45:59 CDT 2008

and one more WikiSh question while we're at it:

and again, i'm not understanding why this won't work - i want to  
check the length of a string, and if it's too long, i'd like to print  
something different out... this is what i had hoped would work:

	{(set -s word = "blammo")}
	result: {(wikish if ${#word} -gt 10; then; echo "string too big";  
else; echo "string just right"; fi)}

however, the result i get is

	result = {#word} -gt 10)
	string too big

any ideas on how i can get the string length to be treated like a  
number and then successfully pushed thru the if statement?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080608/52cac572/attachment.html 

More information about the pmwiki-users mailing list