[NTLUG:Discuss] basic Bash question

Lance Simmons lance at lsimmons.net
Wed Aug 4 00:38:41 CDT 2004


* Steve Baker <sjbaker1 at airmail.net> [040803 18:28]:
> 
> Well, I can think of a kinda-sorta way.
> 
>   #!/bin/bash
>   XXX=$1
>   YYY="WibbleWibble"
>   let YYY=$XXX+0 >& /dev/null
>   if [[ $YYY == $XXX ]] ; then echo "INTEGER" ; else echo "NOT INTEGER" ; fi

I'm using the following for now.  (If you see problems or have
suggestions, please let me know.)

	#!/bin/bash
	#create function
	foo() {
		until [ `<tailing,grepping,cutting> | tee .foo` -ge 0 ]
		do sleep .1; done
		cat .foo
		rm -f .foo
	}
	#use function
	foo

-- 
Lance Simmons



More information about the Discuss mailing list