[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Some basic unix commanding, more please:



Title: RE: Some basic unix commanding, more please:

One-liner example:

for file in * ; do lcfile=`echo $file|tr [A-Z] [a-z]`; echo $file will be $lcfile;done

Of course, use $file and $lcfile as you would like to, with mv $file $lcfile if you dare to

HTH
Thierry

-----Message d'origine-----
De: virtanen
A: debian-user@lists.debian.org
Cc: debian-user@lists.debian.org
Date: 14/07/00 16:04
Objet: Some basic unix commanding, more please:

On Wed, 12 Jul 2000, Matthew Dalton wrote:

______________________________________________________________________

> > And I wanted to get them each into html, if possible with a single
> > command.

> Try:
>
> $ for file in *.doc; do mswordview $file > ${file%.doc}.html; done

_____________________________________________________________________

That made my .doc files into readable .html files by using mswordview,
but
bash is not easy...
_____________________________________________________________________

1)
I managed to make a command, which changes some extensions (coming from
bad copying from dos) like .JPG into .jpg by doing:

for file in *.JPG; do  cp $file ${file%.JPG}.jpg; done

So I got my files like:

picture1.JPG
picture123.JPG
etc

into:

picture1.jpg
picture123.jpg
etc
_____________________________________________

2) But when I have got files like this

NODE23.HTM
NODE13.HTM
NODE79.HTM
etc

How can I make the names into:

node23.html
node13.html
node79.html
etc

It isn't so difficult to change the extension,

but how to change with one command all the beginnings of the names to
start with noncapital letters (or in general change the beginnings on
the
filenames)?

__________________________________________________________

hvirtane@cc.jyu.fi


--
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org <
/dev/null


Reply to: