Sorry, I just realized that if I run it as a script it just drops a line and doesn't tab but if I run it from the shell it outputs perfectly. Thanks for the help.