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
March 23rd, 2008 at 21:03
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 😉
January 11th, 2009 at 0:49
[…] 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 […]