Re: [SLUG] MSWebsite2LinuxWebSite.sh utility?

2003-06-12 Thread Stuart Guthrie
Thanks to Kevin, Colin, Brett and Tony for their help doing the MS2Linux 
Website stuff. Kevin´s script was particularly useful.

Stu

Kevin Waterson wrote:

This one time, at band camp, Stuart Guthrie <[EMAIL PROTECTED]> wrote:

 

From the ThisMustHaveBeenDoneBeforeDept

GNU/Linux does. Is there a utility that can uncapitalise image file 
names, directory names and tags or should I write one?
   



#!/bin/sh
for file in $*
do
if [ -f $file ]
then
 lcfile=`echo $file | tr [:upper:] [:lower:]`
 if [ $file != $lcfile ]
 then
   mv -i $file $lcfile
 fi 
fi
done

Kind regards
Kevin
 



--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] MSWebsite2LinuxWebSite.sh utility?

2003-06-10 Thread Kevin Waterson
This one time, at band camp, Stuart Guthrie <[EMAIL PROTECTED]> wrote:

>  From the ThisMustHaveBeenDoneBeforeDept
> 
> GNU/Linux does. Is there a utility that can uncapitalise image file 
> names, directory names and tags or should I write one?


#!/bin/sh
for file in $*
do
if [ -f $file ]
then
  lcfile=`echo $file | tr [:upper:] [:lower:]`
  if [ $file != $lcfile ]
  then
mv -i $file $lcfile
  fi 
fi
done

Kind regards
Kevin

-- 
 __  
(_ \ 
 _) )            
|  /  / _  ) / _  | / ___) / _  )
| |  ( (/ / ( ( | |( (___ ( (/ / 
|_|   \) \_||_| \) \)
Kevin Waterson
Port Macquarie, Australia
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] MSWebsite2LinuxWebSite.sh utility?

2003-06-10 Thread Colin Humphreys
On Wed, Jun 11, 2003 at 04:11:15PM +1000, Stuart Guthrie wrote:
> From the ThisMustHaveBeenDoneBeforeDept
> 
> I?ve a friend who has a Linux server and they have got a MS web site 
> loaded. Problem is that MS doesn?t care about upper/lower case and 
> GNU/Linux does. Is there a utility that can uncapitalise image file 
> names, directory names and tags or should I write one?

You can translate the names using tr:

tr [:upper:] [:lower:]

A little bit of shell arround it will do what you want for the
fielnames.

For the tags I'd recomend perl. There are plenty of sources for
good http tag matching regex's

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] MSWebsite2LinuxWebSite.sh utility?

2003-06-10 Thread Brett Fenton
You can do it in a couple of lines by calling sed or better yet in perl.

Brett

Stuart Guthrie wrote:

 From the ThisMustHaveBeenDoneBeforeDept

I´ve a friend who has a Linux server and they have got a MS web site 
loaded. Problem is that MS doesn´t care about upper/lower case and 
GNU/Linux does. Is there a utility that can uncapitalise image file 
names, directory names and tags or should I write one?

Stu

--
Brett Fenton
General Manager
NetRegistry Pty Ltd
___
http://www.netregistry.com.au/

Tel: +61 2 96996099  |  Fax: +61 2 96996088
PO Box 270 Broadway  |  NSW 2007, Australia
Your Total Internet Business Services Provider
Trusted by 10,000s of Oz Businesses Since 1997


This email is from NetRegistry Pty Ltd. The contents of this message are 
commercial and in confidence to the intended addresseee.

The message may contain copyrighted and/or legally priviledged 
information. No person or entity other than the intended recipient may 
read, print or store this message, including any and all attached files.

The intended recipient may not forward this message to any third party 
without express written permission from NetRegistry Pty Ltd.
	

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] MSWebsite2LinuxWebSite.sh utility?

2003-06-10 Thread Anthony Wood
On Wed, Jun 11, 2003 at 04:11:15PM +1000, Stuart Guthrie wrote:
>  From the ThisMustHaveBeenDoneBeforeDept
> 
> I´ve a friend who has a Linux server and they have got a MS web site 
> loaded. Problem is that MS doesn´t care about upper/lower case and 
> GNU/Linux does. Is there a utility that can uncapitalise image file 
> names, directory names and tags or should I write one?

Plan B:

use mod_speling with apache which I think does what you want, plus some more.

Note that the spelling of mod_speling is mod_speling, not mod_spelling.

Geek Humour!

-- 
Woody
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


[SLUG] MSWebsite2LinuxWebSite.sh utility?

2003-06-10 Thread Stuart Guthrie
From the ThisMustHaveBeenDoneBeforeDept

I´ve a friend who has a Linux server and they have got a MS web site 
loaded. Problem is that MS doesn´t care about upper/lower case and 
GNU/Linux does. Is there a utility that can uncapitalise image file 
names, directory names and tags or should I write one?

Stu

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug