Article View: alt.comp.linux.isp
Article #12Re: help in linux shell script in copying files
From: Kirk Strauser
Date: Wed, 29 Jan 2003 23:30
Date: Wed, 29 Jan 2003 23:30
19 lines
2388 bytes
2388 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At 2003-01-29T22:51:43Z, Gerhard W. Gruber <sparhawk@gmx.at> writes: > 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]. - -- Kirk Strauser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+OF/f5sRg+Y0CpvERAtbGAJ92p+ZADMCp+WePks3VmfbI4L4ZMQCgiiB/ 7IF4Rfs2LhNjgnWSK5pFrnM= =j6Nl -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<873cnb8s9x.fsf@strauser.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr12.news.prodigy.com.POSTED!not-for-mailReferences:
<b19idc$mb42@imsp212.netvigator.com> <ggmg3vkjlsrlpu9kai312vg7jfid4tp4v4@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b32,9b430d37aa564f05 X-Google-Attributes: gid102b32,public X-Google-Thread: fe70d,9b430d37aa564f05 X-Google-Attributes: gidfe70d,public X-Google-Thread: 1103af,9b430d37aa564f05 X-Google-Attributes: gid1103af,public X-Google-Thread: 106e9e,9b430d37aa564f05 X-Google-Attributes: gid106e9e,public X-Google-Thread: 102983,9b430d37aa564f05 X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2003-01-29 15:31:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr12.news.prodigy.com.POSTED!not-for-mail 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 References: <b19idc$mb42@imsp212.netvigator.com> <ggmg3vkjlsrlpu9kai312vg7jfid4tp4v4@4ax.com> Organization: The Strauser Group From: Kirk Strauser <kirk@strauser.com> Message-ID: <873cnb8s9x.fsf@strauser.com> Lines: 9 X-Newsreader: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:/Tbt3N5gf1daiZvNS7ZTSHmuC+U= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable NNTP-Posting-Host: 65.65.224.48 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr12.news.prodigy.com 1043883006 ST000 65.65.224.48 (Wed, 29 Jan 2003 18:30:06 EST) NNTP-Posting-Date: Wed, 29 Jan 2003 18:30:06 EST X-UserInfo1: [[PGWZKGERBEBFD[LZKJOPHAWB\^PBQLGPQRJRQIMASJETAANVW[AKWZE\]^XQWIGNE_[EBL@^_\^JOCQ^RSNVLGTFTKHTXHHP[NB\_C@\SD@EP_[KCXX__AGDDEKGFNB\ZOKLRNCY_CGG[RHT_UN@C_BSY\G__IJIX_PLSA[CCFAULEY\FL\VLGANTQQ]FN Date: Wed, 29 Jan 2003 23:30:06 GMT