AnotherAlan
Technical User
Morning all, I have looked through the threads already pertaining to my question, but I still can't get the syntax correct.
I would like to use a script to add a newly created netgroup to my passwd files. However, as I already have netgroups defined I have a bin/false entry at the tail of each passwd file.
I am attempting to add a new line above this bin/false entry and include the new netgroup.
My problem is that I am useless at expressions and due to the nature of a netgroup entry i.e. +@XXXX it is far too many metacharacters for me to work out the sed or nawk statement. I hope this makes sense.
All help very much appreciated, or else I've got 200 servers to change manually.
I would like to use a script to add a newly created netgroup to my passwd files. However, as I already have netgroups defined I have a bin/false entry at the tail of each passwd file.
I am attempting to add a new line above this bin/false entry and include the new netgroup.
My problem is that I am useless at expressions and due to the nature of a netgroup entry i.e. +@XXXX it is far too many metacharacters for me to work out the sed or nawk statement. I hope this makes sense.
All help very much appreciated, or else I've got 200 servers to change manually.