This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB1C239B9E24428156300566A
Content-Type: text/plain; charset=windows-1251; format=flowed
Content-Transfer-Encoding: quoted-printable
Andrew Gaydenko schrieb:
> =3D=3D=3D=3D=3D=3D=3D On Monday 31 March 2008, Etaoin Shrdlu wrote: =3D=
=3D=3D=3D=3D=3D=3D
> =20
>> On Monday 31 March 2008, 11:31, Andrew Gaydenko wrote:
>> =20
>>> I agree, my English is ugly. I'll try to explain. Saying "viewer" I
>>> mean something like this:
>>>
>>> logviewer kdelibs
>>>
>>> will "produce" the same output as, say,
>>>
>>> less /usr/portage/kde-base/kdelibs/ChangeLog
>>>
>>> You see, it is impossible to remember all packages' dirs. Of
>>> course, I can use 'q' or 'eix' to find a dir and then type in a
>>> long 'less ...' command. But, well, why do all these 'eix' and 'q'
>>> exist? I think to save some users' time. Is my intention more clear
>>> now? :-)
>>> =20
>> Neil will surely provide an adequate answer, however, if your needs
>> aren't too sophisticated, you could put together something like
>>
>> $ cat logviewer.sh
>> #!/bin/bash
>>
>> if [ -z "$1" ]; then
>> echo "Must specify package name!" >&2
>> exit 1
>> fi
>>
>> p=3D`eix --only-names -e "$1"`
>>
>> if [ -z "$p" ]; then
>> echo "$1: No matches found" >&2
>> exit 1
>> else
>> howmany=3D`echo "$p" | wc -l`
>> if [ "$howmany" -gt 1 ]; then
>> echo "Many packages with the same name, refine search string:"
>> =20
>>> &2 echo "$p" >&2
>>> =20
>> exit 1
>> fi
>> fi
>>
>> c=3D"/usr/portage/${p}/ChangeLog"
>>
>> if [ -z "$EDITOR" ]; then
>> EDITOR=3D`which vi`
>> fi
>>
>> "$EDITOR" "$c"
>> ---------
>>
>> You can also remove the "-e" from the eix line if you want
>> approximate matching (that will require you to specify the category
>> almost always though).
>> Hope this helps.
>> =20
>
> Thanks! I definitely must read a bash documentaton :-)
> =20
I think this will be your friend:
http://tldp.org/LDP/abs/html/
--------------enigB1C239B9E24428156300566A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH8M2ugAnW8HDreRYRAoorAJ0SLgo+EfcQQ1iO9Cj9Xvs7goj+JgCeMpGd
7SZtZt4QlPffTAfFL5sM92Y=
=D47d
-----END PGP SIGNATURE-----
--------------enigB1C239B9E24428156300566A--
--
gentoo-user@lists.gentoo.org mailing list