Re: help in linux shell script in copying files

From: Gerhard W. Gruber (
Date: 01/30/03

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

On Wed, 29 Jan 2003 23:30:06 GMT wrote Kirk Strauser <> in
comp.os.linux.misc with <>

>> 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? ...
  • 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 ...
  • 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. ...