Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > BOOK: Beginning Fedora 2
|
BOOK: Beginning Fedora 2
This is the forum to discuss the Wrox book Beginning Fedora 2 by Shishir Gundavaram, Kapil Sharma, Deepak Thomas, Pancrazio De Mauro, Mark Mamone, Simon Whiting, Sandip Bhattacharya; ISBN: 9780764569968
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Fedora 2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 13th, 2005, 11:02 AM
Registered User
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning Fedora 2 Tripwire Script-Page435-436

Hi All,

1st post here. Be gentle. Ok, here is what I'm after. I have Beginning Fedora 2 and in this book, there is a script for tripwire, but, it doesn't work. This is the script,

#! /usr/bin/perl -w
$Additions = 0;
$Removals = 0;
while ($line = <STDIN>) {
if ( $line =~ /^\s*#\s*(\/\S+)/ ) {
if ( -e $1 ) {
$line =~ s/^\s*#//;
$Additions++;
}
} elsif ( $line =~ /^\s*(\/\S+)/ ) {
if ( ! -e $1 ) {
$line = "# " . $line;
$Removals++;
}
}
}
print STDERR "Number of additions: $Additions\n";
print STDERR "Number of removals: $Removals\n";

and here is the suggested command to run,

/usr/local/bin/cleanpol.pl <twpol.txt.orig \ >twpol.txt

The problem I get, is, that nothing is written to twtpol.txt, although the additions/removals are printed to the screen. Anyone see why this is so.?

Cheers.

coolboarderguy...





Similar Threads
Thread Thread Starter Forum Replies Last Post
"Single and SingleOrDefault" (p. 436) roman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 July 3rd, 2008 07:48 PM
Fedora and vmware cirudinezidane Linux 0 October 1st, 2004 07:09 PM
Table join problem Chapter 12, p 436 PHP-Beg tomasz BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 August 31st, 2003 12:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.