diff options
author | Jonas Smedegaard <dr@jones.dk> | 2006-07-16 12:29:16 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2006-07-16 12:29:16 +0000 |
commit | 208d022245cecb2de49d1a2265b70485535f11e4 (patch) | |
tree | 69a1fdb33bc8b5eb1f6c6647374bdff8ac4658be /localuserconfig | |
parent | e80d459f379c9a617f5e5c422d33a9e32a0e0721 (diff) |
Change head -1 -> head -n 1
Diffstat (limited to 'localuserconfig')
-rwxr-xr-x | localuserconfig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/localuserconfig b/localuserconfig index 82853c8..5ccb06d 100755 --- a/localuserconfig +++ b/localuserconfig @@ -1,9 +1,9 @@ #!/bin/sh # # /usr/local/bin/localuserconfig -# Copyright 2004 Jonas Smedegaard <dr@jones.dk> +# Copyright 2004-2006 Jonas Smedegaard <dr@jones.dk> # -# $Id: localuserconfig,v 1.7 2004-04-19 20:45:06 jonas Exp $ +# $Id: localuserconfig,v 1.8 2006-07-16 12:29:16 jonas Exp $ # # Set/change local account settings # @@ -68,7 +68,7 @@ runmode="interactive" user="`id -u -n`" uid="`id -u`" -HOME="`getent passwd \"$user\" | awk -F: '{print $6}' | head -1`" +HOME="`getent passwd \"$user\" | awk -F: '{print $6}' | head -n 1`" #TODO: Allow root to pass the above as options # Safety checks (disable silently - the user can't correct it anyway) @@ -98,8 +98,8 @@ fi if [ "$do_server" = "yes" ]; then server_edit="1" if [ -r "$HOME/$server_userconf" ]; then - server_username="$(grep '^username' $HOME/$server_userconf | awk -F= '{print $2}' | head -1 | awk '{print $1}')" - server_password="$(grep '^password' $HOME/$server_userconf | awk -F= '{print $2}' | head -1 | awk '{print $1}')" + server_username="$(grep '^username' $HOME/$server_userconf | awk -F= '{print $2}' | head -n 1 | awk '{print $1}')" + server_password="$(grep '^password' $HOME/$server_userconf | awk -F= '{print $2}' | head -n 1 | awk '{print $1}')" fi if [ -n "$server_username" ]; then server_edit="" |