Any #Automator #ShellScript experts care to help?

I created the following script to copy the first 6 characters of a selected filename to the clipboard. But the clipboard item ends up with a hard return after the characters. Is there a way to put a stop to that?

Ah, it seems my Google-foo is strong. I think I found a modified #Automator #ShellScript to not add the line feed.