[TriLUG] OT - Help merging multiple files into a single file

howard.x.boyd at gsk.com howard.x.boyd at gsk.com
Fri Nov 9 14:17:29 EST 2007


Andrew:

Sending a word of thanks for your suggestion to my problem.

I ended up writing a script that ran the diff command against a master 
sudoers file and compared against each of the other 200 or so sudoers 
files on the other servers. The script wrote the output to a single file 
which I plan to review by hand and then generate a new master sudoers file 
to place on all the servers.

Thanks again for you suggestion. Regards,

Howard

**************************************************************
* Then I realized that it is good and proper for a man to
* eat and drink, and to find satisfaction in his toilsome
* labor under the sun during the few days of life God has
* given him - for this is his lot. Moreover, when God gives
* any man wealth and possessions, and enables him to
* enjoy them, to accept his lot and be happy in his work -
* this is a gift of God. Ecclesiastes 5:18-19 NIV
**************************************************************



"Andrew Perrin" <clists at perrin.socsci.unc.edu> 
Sent by: trilug-bounces at trilug.org
07-Nov-2007 16:11
Please respond to "Triangle Linux Users Group General Discussion" 
<trilug at trilug.org>

 
To
"Triangle Linux Users Group General Discussion" <trilug at trilug.org>
cc

Subject
Re: [TriLUG] OT - Help merging multiple files into a single file






What about something like:

cat * | sort | uniq > /tmp/newsudoers

(UNTESTED but I would expect it to work)

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - 
http://perrin.socsci.unc.edu
Associate Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA



On Wed, 7 Nov 2007, howard.x.boyd at gsk.com wrote:

> Could someone please suggest a unix command or utility that will help me
> merge the contents of multiple files into a single file. We currently 
have
> 200+ AIX systems with a /etc/sudoers file on each server. The contents 
of
> these files may or may not be the same. The goal is to examine the
> contents of all the files and merge them into a single master sudoers 
file
> that will be maintained and periodically pushed out to all the servers.
> Would appreciate any suggestions or ideas on how best to accomplish this
> task. Thanks,
>
> Howard
>
> **************************************************************
> * Then I realized that it is good and proper for a man to
> * eat and drink, and to find satisfaction in his toilsome
> * labor under the sun during the few days of life God has
> * given him - for this is his lot. Moreover, when God gives
> * any man wealth and possessions, and enables him to
> * enjoy them, to accept his lot and be happy in his work -
> * this is a gift of God. Ecclesiastes 5:18-19 NIV
> **************************************************************
> -- 
> TriLUG mailing list        : 
http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>
-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/





More information about the TriLUG mailing list