Skip to Content.
Sympa Menu

baslinux - Re: [BL] bash help; changing case of file names, hyperlinks

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: BL listserv <baslinux AT lists.ibiblio.org>
  • Subject: Re: [BL] bash help; changing case of file names, hyperlinks
  • Date: Fri, 23 Feb 2007 20:21:19 +0000 (UTC)

On Fri, 23 Feb 2007, James Miller wrote:

I've run across a problem that a bash script might resolve. But my bash
skills are
rudimentary at best. I'd therefore like to ask for help with this project.
I've
downloaded a grouping of html files I want to have resident on my home
computer. The
files are linked together in series and link one to another from within each
html file
as well as from some centralized index pages. The problem is that this
grouping of
files was created by some (not too bright) M$ user who paid little or no
attention to
case sensitivity. Sometimes file names are in lower case, sometimes in upper
case
(mostly upper case). The problem, as should be clear, is that the links don't
work on
a Linux system if the case is not properly specified in the hyperlink. What I
therefore need to do is convert the relevant file names, whether under their
resident
directory, or within the html files themselves, to either upper or lower
case. It

You would probably use tr a-z A-Z but I can't figure out how to do anything except echo filename | tr a-z A-Z to display FILENAME.

How might I write a script that asks someone to type in their login name and replaces another string with that in a file? My local bbs still has no spam filter and I offered mine for general use but people don't know how to edit. So it should also write my filter to their home directory after replacing my login with theirs. They know how to type their login. The script should work in bash. Anyone who changed their shell knows how to edit already. The staff member who was working on this for a few months quit due to other staff members with nasty tempers.

I have a .procmailrc which invokes spamc. The script could also offer them a choice of whether to dump spam or save it to a spam folder. I am going to dump anything with 3 spamassassin points rather than default 5.

I asked for help at the bbs and a couple of nasty staff and board members keep telling me nobody uses pine mutt or mailx and to use gmail instead.




Archive powered by MHonArc 2.6.24.

Top of Page