Pierre Labastie wrote: > Le 06/01/2012 04:49, Jeremy Huntwork wrote: >> I'm sure whatever you choose to do is perfectly fine for your needs, but >> objecting to parameter substitution as being more complicated than piping to >> head and then cut is silly. It's simple pattern substitution like you do >> with sed in the rest of the book. >> >> If you really mean that it makes the script less readable, then sure, >> possibly. But then your goal is readability and not necessarily simplicity. >> At that rate, I'd suggest you add some comments to the script and/or >> separate out individual package sections with some white space. >> >> JH > Well, all in all, why not use directly: > > ldd --version | head -n1 > > Works even on (an emulated) RH 6.2... > > Maybe: > > ldd --version | head -n1 | cut -d" " -f2- > > Avoids the confusing "ldd" at the beginning of the line
Nice. I'll do that. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
