Re: einheitlicher desktop der agelegter benutzer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 14 Sep 2005 23:31:34 +0200
Steffen Joeris <steffen.joeris@skolelinux.de> wrote:
> > dirs="$(getent passwd | sed -e 's#:#\ #g' | awk '{print $6}' |
> > grep /home0)"
That blows up if a full name contains spaces.
Better do this instead:
dirs="$(getent passwd | awk -F: '{print $6}' | grep /home0)"
Also beware that looping through the results as you do will fail if the
path contains spaces or other funny characters.
- Jonas
- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
- Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDKJ0un7DbMsAkQLgRAvspAJ94IFlGfb0Qdm91RLOjuPkJVvrDDQCfXm5Z
L9kAkFc6eXOWpguuiY/Q8kc=
=v4zl
-----END PGP SIGNATURE-----
Reply to: