On 08/22/2016 05:45 PM, William Hubbs wrote: > On Mon, Aug 22, 2016 at 09:53:48PM +0200, Ulrich Mueller wrote: >>>>>>> On Mon, 22 Aug 2016, William Hubbs wrote: >> >>> Display-If-Installed: <sys-apps/openrc-0.22 >> >> Why the condition on the version number? > > I suppose I could change this to just sys-apps/openrc > >> >>> # emerge --oneshot -av $(grep -l "#!/sbin/runscript" /etc/init.d/*) >> >> Hm, I think you'll want single quotes there, otherwise the exclamation >> mark could trigger bash history expansion. Alternatively, grep for >> /sbin/runscript without the shebang (with the additional advantage >> that it would also catch cases with whitespace after the #!). > > Is '#! /sbin/runscript' a valid shebang line? I didn't think you could > have whitespace after the '#!'. > > William >
Yes, it is. I just checked my /usr/bin, and found over 100 scripts that all begin with the string "#! /", including many scripts from autoconf, among others. -- Jonathan Callen
signature.asc
Description: OpenPGP digital signature