initial commit

This commit is contained in:
Fabio Scotto di Santolo
2020-07-28 19:28:25 +02:00
commit 4cc88d2f6e
245 changed files with 22820 additions and 0 deletions

28
chapter6/search_group_id.bash Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
#
# SCRIPT: search_group_id.bash
# AUTHOR: Randy Michael
# DATE: 14/4/2007
# REV: 1.0
# PURPOSE: This script is used to list the group(s) associated
# with each user defined in the /etc/passwd file.
#
#
###########################################
# DECLARE FILES AND VARIABLES HERE
###########################################
case $(uname) in
SunOS) alias awk=nawk
;;
esac
#########################################
# BEGINNING OF MAIN
#########################################
cat /etc/passwd | awk -F : '{print $1}' | while read ID
do
echo -e "${ID}: \c"
id -Gn $ID
done