Hi Joacim. The code you have would work perfect for my applications. I have a command that produces one word on the command line and I just need to grab that one word output. I tried your code, but I can't get it to work for my output. I would appreciate any help!