Thanks for the help. I need to look into tokens a bit more. As for the "write -l" thing, it actually works for me doing it the way I have it without the $+. I'll make the change to the %badtok statement today and see what that does. Thanks again.