[NTLUG:Discuss] Script question: give me the next sequential filename....

Michael Farnham mfarnham at acm.org
Mon Mar 31 16:38:15 CST 2003


On Monday 31 March 2003 11:13, Fred James wrote:

> Does "declare -i n" initialize "n" to 0, NULL, or junk?

I am not sure.

On my system (bash version 2.0.05) when I echo an uninitialized
variable that has been declared with -i I get an empty line. I
avoid the problem by always initializing variables before I use them.

The man page does not say. I assume it is NULL.

BTW

Almost as soon as I sent my first response I realized that I had not
put in the wildcard character. I decided that Jack could probably
figure it out. I am glad to see I was correct.

Regards
Mike Farnham

-- 
You've got to be honest; if you can fake that, you've got it made.
                         -- George Burns



More information about the Discuss mailing list