zsh-bashing to rescue the NSLog

Doing some tool that uses a NSTask to launch shell-scripts, I ran into a very annoying bug these days. The script were bash scripts and as soon as they were started, all output written by NSLog didn’t go to Xcode’s console, but rather only to console.log. This problem only seems to happen when using bash to execute the scripts, so switching to zsh did the trick and now NSLog works as charming as always. Thanks a lot to Michele for the hint with Zsh, I didn’t know that it uses the same syntax as bash and thus the only changes to the scripts were changes to the first line!

thanks a lot for the folks that found this out!

Karsten

2 Responses to “zsh-bashing to rescue the NSLog”

  1. Michele Says:

    Just to point out, the syntax is not exactly the same, but they both derive from Bourne Shell, so for most things they are compatible 😉

  2. Recent Links Tagged With "zsh" - JabberTags Says:

    […] public links >> zsh Pitfalls with Mercurial, ZSH and SSH Saved by funkyphenix on Fri 09-1-2009 zsh-bashing to rescue the NSLog Saved by chr5 on Sun 28-12-2008 Linux::Define Shell Saved by mltg on Fri 26-12-2008 Bash or Zsh […]