Article View: alt.comp.linux.isp
Article #5Re: help in linux shell script in copying files
From: Gerhard W. Gruber
Date: Thu, 30 Jan 2003 19:36
Date: Thu, 30 Jan 2003 19:36
17 lines
2313 bytes
2313 bytes
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)
Technical Details
Message-ID:
<sjvi3vohja0qc46n2goaqs8823cq52o2r4@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!teaser.fr!newsfeed.stueberl.de!uucp.gnuu.de!newsfeed.arcor-online.net!news.arcor.de!not-for-mailReferences:
<b19idc$mb42@imsp212.netvigator.com> <ggmg3vkjlsrlpu9kai312vg7jfid4tp4v4@4ax.com> <873cnb8s9x.fsf@strauser.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fe70d,9b430d37aa564f05 X-Google-Attributes: gidfe70d,public X-Google-Thread: 102b32,9b430d37aa564f05 X-Google-Attributes: gid102b32,public X-Google-Thread: 106e9e,9b430d37aa564f05 X-Google-Attributes: gid106e9e,public X-Google-Thread: 1103af,9b430d37aa564f05 X-Google-Attributes: gid1103af,public X-Google-Thread: 102983,9b430d37aa564f05 X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2003-01-30 11:37:14 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!teaser.fr!newsfeed.stueberl.de!uucp.gnuu.de!newsfeed.arcor-online.net!news.arcor.de!not-for-mail From: Gerhard W. Gruber <sparhawk@gmx.at> Newsgroups: alt.comp.linux.isp,aus.computers.linux,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.security Subject: Re: help in linux shell script in copying files Date: Thu, 30 Jan 2003 20:36:19 +0100 Message-ID: <sjvi3vohja0qc46n2goaqs8823cq52o2r4@4ax.com> References: <b19idc$mb42@imsp212.netvigator.com> <ggmg3vkjlsrlpu9kai312vg7jfid4tp4v4@4ax.com> <873cnb8s9x.fsf@strauser.com> X-Newsreader: Forte Agent 1.92/32.572 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 17 Organization: Arcor NNTP-Posting-Date: 30 Jan 2003 20:37:13 MET NNTP-Posting-Host: 212.144.243.81 X-Trace: DXC=83Jd@7d3a[G5VQnf?UOZgE:ejgIfPPldDjW\KbG]kaMHdbobRQ:W=WBZMG>U0;G_4Ng3LX5[[^J7Dm_6C2K59d[IhVc]h9Vh_kC X-Complaints-To: abuse@arcor-online.net