Re: help in linux shell script in copying files

From: Gerhard W. Gruber (sparhawk@gmx.at)
Date: 01/30/03


From: Gerhard W. Gruber <sparhawk@gmx.at>
Date: Thu, 30 Jan 2003 20:36:19 +0100

On Wed, 29 Jan 2003 23:30:06 GMT wrote Kirk Strauser <kirk@strauser.com> in
comp.os.linux.misc with <873cnb8s9x.fsf@strauser.com>

>> cd /temp; ls | while read f; do FIRST=`echo "$f" | cut -c1 | tr "[a-z]"
>> "[A-Z]"`: mv "$f" "/data/$FIRST/$f"; done
>
>Be careful! He'll lose homework points if any filenames start with [^a-zA-Z].

I know that. :) But that's his problem and he shouldn't abuse other people to
do his homework anyway. :) So while it works it should be always a good idea
to check if the answer is right and does what it is expected to do. :)

-- 
Gerhard Gruber
Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)


Relevant Pages

  • Re: Trafficking
    ... Mitchell & Webb Show the other week, something like "Our maths teacher's ... set us an hour's homework ... ... that's, like, abuse, you know? ...
    (uk.legal)
  • Re: KRS - Possible news to come
    ... Stop your STALKING and ABUSE I have told you my sources are in a post from 1952 ... when I was Inventing Usenet! ... Do your homework and THEN you can talk about the ...
    (sci.archaeology)
  • Re: how to parse complex table
    ... Using to do your homework is abuse. ... Using it to ask about homework isn't. ... Include some input data. ... Eliminate software piracy: use only FLOSS. ...
    (perl.beginners)