Re: [expert] problem with InteractiveBastille

2001-07-30 Thread Dan Woods



>  I am trying to configure iptables.
> When I run InteractiveBastille, it bombs out with the following error
> message.
> 
> InteractiveBastille
> Using Tk user interface module.
> Only displaying questions relevant to the current configuration.
> Can't locate Bastille_Tk.pm in @INC (@INC contains: /usr/lib
> /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
> /usr/lib/perl5/site_perl/5.6.0/i386-linux
> /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl
> /usr/lib/perl5/site_perl/ /usr/lib/Bastille) at
> /usr/sbin/InteractiveBastille line 270.

You need the following packages (from your CD or mirror site)
   Bastille-Tk-module-1.2.0.rc3-0.1mdk
   Bastille-Curses-module-1.2.0.rc3-0.1mdk
   Bastille-1.2.0.rc3-0.1mdk

Thanks...Dan.




Re: [expert] shell programming question

2001-04-08 Thread Dan Woods


Karl Cunningham wrote:
> 
> I'm writing a shell script that will have problems if another instance of
> itself is running, and I'd like to be able to trap that the user has
> started multiple instances.  I've tried
> 
> cnt=`ps ax | grep -c xyz`
> 
> where xyz is the name of the script.  It returns 3 when there is only one
> instance running.  I think I understand why it's 3 (one for the script
> itself, one for it running ps and one for it running grep?).  Will this
> always work?  Is there a better way?

This works from command line...

   # if [ `ps -efw | grep -v grep | grep rerf |wc -l` -eq 0 ] ; then
echo 'yes' ; else echo 'no' ; fi

In a shell script, make it more readable...
if [ `ps -efw | grep -v grep | grep rerf |wc -l` -eq 0 ]
then
   echo 'yes'
   # more statements here, etc.
else
   echo 'no'
fi 

-
Also, analias command that I use *often* is
# alias psg
alias psg='ps -efw | grep -v grep | grep'

This avoids seeing the 'grep' that is forked off by your request.

Thanks...Dan




Re: [expert] renaming multiple files

2001-04-07 Thread Dan Woods


Kelley Terry wrote:
> 
> Is there a way to rename multiple files all of the format
> q_tif.bz2  to  q.tif.bz2  where the # represent digits.  In other
> words I need to change the underscore "_" character to a dot "." for all the
> file names in a directory.  If there is a way to do this w/o a shell script
> it would be great but I can't find one.
> --
> "It said uses Windows 95 or better, so I loaded Linux!"
> "In a world without walls and fences, who needs windows and gates?"
> Kelley Terry <[EMAIL PROTECTED]>

Here's one post from the past...
--
Date: Sat, 19 Aug 2000 11:51:04 +0200
From: Alexander Skwar <[EMAIL PROTECTED]>
Subject: Re: [expert] Scripting- Uppercase to lowercase

Renaming...
for NAME in `find www_root -type f` ; do
mv $NAME `echo $NAME | tr '[:upper:]' '[:lower:]'
done
--

For your needs, you would want something like...
for NAME in `find www_root -name "q*tif.bz2" -type f` ; do
mv $NAME `echo $NAME | tr '_' '.'
done

Only problem might be that *all* underscores will get changed.

Thanks... Dan.




Re: [expert] Error in Apache

2000-12-22 Thread Dan Woods


Irwan Hadi wrote:
> 
> At 06:46 AM 12/22/00 -0800, you wrote:
> >Try it in your cgi-bin? Permissions correct?
> >Execute it from the shell, see what kind of error
> >output there is..
> 
> It works finely if I execute it in shell
> ./hello.cgi

The real problem is that the file is in DOS format, instead
of *nix. So it has the wrong end of line format. Look through
the archives or deja news for answers on how to fix this.

Thanks...Dan.