[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool nits
From: |
Eric Blake |
Subject: |
Re: gnulib-tool nits |
Date: |
Sat, 23 Jun 2007 15:31:12 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 6/23/2007 1:09 PM:
> But then use IFS (so that PATH elements containing spaces are handled
> correctly), ignoring empty fields from the cases C and D. In summary,
> something like this:
>
> pathx=`echo ":$PATH:" | sed -e 's/:::*/:.:/g' -e 's/^://' -e 's/:\$//'`
Or, to avoid the sed when possible, you could do
case `echo ":$PATH:" in
*::*) pathx=`echo ":$PATH:" \
| sed -e 's/:::*/:.:/g' -e 's/^://' -e 's/:\$//'` ;;
esac
> save_IFS=$IFS
> IFS=:
> for d in $pathx; do
> IFS=$save_IFS
> ...
> done
> IFS=$save_IFS
>
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGfZEf84KuGfSFAYARAk4kAJ4pZezID/Dk18L0YboapOxYWl2HlwCfUX0s
nh/rxU1SZK+CMhQLZqmJMRc=
=QT3X
-----END PGP SIGNATURE-----
Re: gnulib-tool nits, Paul Eggert, 2007/06/26