Skip to content

Instantly share code, notes, and snippets.

@Nuc1eoN
Last active December 14, 2015 19:18
Show Gist options
  • Save Nuc1eoN/5135140 to your computer and use it in GitHub Desktop.
Save Nuc1eoN/5135140 to your computer and use it in GitHub Desktop.
awk: Command line:2: { if ($3 == 0 || ($3 >= 1000 ^Unexpected newline or end of string
awk: Command line:2: { if ($3 == 0 || ($3 >= 1000
awk: Command line:2: ^ Unexpected newline or end of string
remove_GNOME_startup()
{
GID_MIN=`grep 'GID_MIN.*[0-9]' /etc/login.defs | grep -v 'SYSTEM_GID_MIN' | awk '{print $2}'` || GID_MIN=0
GID_MAX=`grep 'GID_MAX.*[0-9]' /etc/login.defs | grep -v 'SYSTEM_GID_MAX' | awk '{print $2}'` || GID_MAX=100000
for user in `cat /etc/passwd | awk -F : '{ if ($3 == 0 || ($3 >= '$GID_MIN' && $3 <= '$GID_MAX')) print $6 }' | sort | uniq`
do
remove_user_startup $user
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment