4 ms·
You should be piping that into bash instead of sh. With sh, it infinitely prints out [: 48: unexpected operator read: 48: Illegal option -s
by tkahn6 16y ago
You should be piping that into bash instead of sh.
With sh, it infinitely prints out
[: 48: unexpected operator
read: 48: Illegal option -s
- w1ntermute 16y agoHaha, I take it you're on Ubuntu? Ubuntu uses dash[0] as its default shell to speed things up. Funny thing is I've run into this same issue before in another context with sh vs bash on Ubuntu. In any case, updated. 0: https://secure.wikimedia.org/wikipedia/en/wiki/Debian_Almquist_shell https://secure.wikimedia.org/wikipedia/en/wiki/Debian_Almqui...
- tkahn6 16y agoYou know I almost specified my distribution but thought 'surely that wouldn't make a difference'. lol
- ez77 16y agoUbuntu uses dash as its default shell to speed things up. Actually it is (sadly) the major reason, but not the only one: The Debian policy manual has long mandated that "shell scripts specifying '/bin/sh' as interpreter must only use POSIX features"; in fact, this requirement has been in place since well before the inception of the Ubuntu project. Furthermore, any shell scripts that expected to be portable to other Unix systems, such as the BSDs or Solaris, already honoured this requirement. Thus, we felt that the compatibility impact of this change would be minimal. [1] Personally I think that assuming nothing but POSIX is a more compelling reason than efficiency. [1] https://wiki.ubuntu.com/DashAsBinSh https://wiki.ubuntu.com/DashAsBinSh