CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [BillKSmith] need help trying to perfect a filtering multiple file content : Edit Log



pengboi
New User

Apr 20, 2017, 10:33 AM


Views: 945
Re: [BillKSmith] need help trying to perfect a filtering multiple file content

i want the output file to be other groups and append the groups with single users to the ignore file.
one of the group files example: cat /PASSGRP/server1.group

adm:!:4:bin,adm,root
uucp:!:5:uucp,nuucp
mail:!:7:
security:!:7:root,a***,a***,a***,a***,a***,a***,a****,a****,a****,a***,a***,a****,a****,a****
cron:!:8:root
printq:!:9:lp
audit:!:10:root,svqradar
ecs:!:18:
nobody:!:4294967294:nobody,lpd
usr:!:100:
perf:!:20:
sshd:!:209:sshd

i will like the output of the script to append this groups with more than 1 user to a new server1.group file

security:!:7:root,a***,a***,a***,a***,a***,a***,a****,a****,a****,a***,a***,a****,a****,a****
adm:!:4:bin,adm,root
uucp:!:5:uucp,nuucp
audit:!:10:root,svqradar


remove the following lines and append the group name to group.ignore file. because they either have no members or have just themselfs as the only member.

sshd:!:209:sshd
usr:!:100:
perf:!:20:
cron:!:8:root
printq:!:9:lp
ecs:!:18:
mail:!:7:

if it is possible to filter by lines or however you see i can complete this.

thanks in advance


(This post was edited by pengboi on Apr 20, 2017, 10:34 AM)


Edit Log:
Post edited by pengboi (New User) on Apr 20, 2017, 10:34 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives