🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.linux.isp
Article #11

Re: help in linux shell script in copying files

#11
From: Michael Heiming
Date: Wed, 29 Jan 2003 23:28
27 lines
2245 bytes
In comp.os.linux.misc Laplace <Laplace@tranforms.org> wrote:
> if the "first letter is "A" or "a" copy it from \temp\ to \data\A\.... until
> finished A
> if the "first letter is "A" or "a" copy it from \temp\ to \data\A\.... until
> finished A to Z....

Where do you see all those backslahes?

> up to Z....

> can u show me the script?

Script? 

$ ls | awk '/^[A-z]/{d=toupper(substr($1,1,1));system("cp "$1" "d"/")}'

(No error checking at all, better use 'find')

However, if this is homework, I wouldn't suggest showing up something 
like this.

Please reduce cross-posting, to reasonable groups.

Michael Heiming
-- 
Remove +SIGNS and www. if you expect an answer, sorry for 
inconvenience, but I get tons of SPAM
Technical Details
Message-ID: <r3o91b.2bi.ln@news.heiming.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!uni-erlangen.de!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail
References: <b19idc$mb42@imsp212.netvigator.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: 102983,9b430d37aa564f05
X-Google-Attributes: gid102983,public
X-Google-Thread: fe70d,9b430d37aa564f05
X-Google-Attributes: gidfe70d,public
X-Google-Thread: 106e9e,9b430d37aa564f05
X-Google-Attributes: gid106e9e,public
X-Google-Thread: 1103af,9b430d37aa564f05
X-Google-Attributes: gid1103af,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!syros.belnet.be!news.belnet.be!uni-erlangen.de!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail
From: Michael Heiming <michael+USENET@www.heiming.de>
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
Followup-To: comp.os.linux.misc
Date: Thu, 30 Jan 2003 00:28:59 +0100
Organization: huhu
Lines: 27
Message-ID: <r3o91b.2bi.ln@news.heiming.de>
References: <b19idc$mb42@imsp212.netvigator.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.t-online.com 1043882943 03 10871 zixDE3RTSWYlmd 030129 23:29:03
X-Complaints-To: abuse@t-online.com
X-Sender: 520014283466-0001@t-dialin.net
User-Agent: tin/1.4.6-20021227 ("MH platin edition") (UNIX) (Linux/2.4.20 (i686))