Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* Re: copy *.doc *.bak (Was: Re: The big Question)
@ 1995-01-05 20:36 Sara E Rouner
  0 siblings, 0 replies; 2+ messages in thread
From: Sara E Rouner @ 1995-01-05 20:36 UTC (permalink / raw)


>>On the other hand, because of this, I believe DOS will allow you to
>>issue a command like: 

>>>copy *.doc *.bak

>>and have it do the right thing (copy a.doc to a.bak, b.doc to b.bak,
>>and so forth). Because the shell handles expansion in UNIX, UNIX
>>can't do this sort of thing.

I recognize this thread for what it is.. pure flame bait.. but I can't
sit on my hands and let an incorrect statement like this go by
unattended.  Expansion is a major strength of sh-programming.. and so
is parameter execution.  You really need to know that sort of stuff to
get the most from UNIX.

A UNIX user will opt to use a sh-command line like:

   for f in *.doc; do cp $f `basename $f .doc`.bak; done

or, if the list of files is small enough, a sh-command line like:

   for f in a b and so forth; do cp $f.doc $f.bak; done



Do you need a script for your UNIX account?  Is that what you're
really asking for?  Well, this one should work:

#!/bin/sh
## cpx: copies a set of files with the same ext. to a different ext.
## example: to copy all *.doc files to *.bak -- cpx doc bak
for f in *.$1; do cp $f `basename $f .$1`.$2; done


^ permalink raw reply	[flat|nested] 2+ messages in thread
* The big Question
@ 1994-12-27 18:34 John Laing Page
  1994-12-29 16:50 ` Lee Sailer
  0 siblings, 1 reply; 2+ messages in thread
From: John Laing Page @ 1994-12-27 18:34 UTC (permalink / raw)


I have lecturers who currently are using MS-DOS and UNIX
as examples of badly designed software. Whilst I agree in
part with this I think the MS-DOS was fine for the original
hardware it was written to run on, which could most likely not
have supported anything larger. UNIX, well thats what happens
when things are designed by comittee.
However I ave to prepare a document about operating system design
an would vaule any comments about designing a new operating system.
 o Would it be worthwhile at the moment
 o What should it include
 o Need it be backwardly compatible.
Also if anyone wants to support the case for MS-DOS and UNIX then
feel free to do so.
All comments would be very much appreciated. I will post a summary
of anything emailed to me and not posted.
_________________________________________________________________
JOHN PAGE -> jlp@st-and.ac.uk -> Amiga 1200, GVP A1230, 6Mb, 80HD
_________________________________________________________________
           status: Degree hunting in darkest St.Andrews


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-01-05 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-01-05 20:36 copy *.doc *.bak (Was: Re: The big Question) Sara E Rouner
  -- strict thread matches above, loose matches on Subject: below --
1994-12-27 18:34 The big Question John Laing Page
1994-12-29 16:50 ` Lee Sailer
1994-12-29  8:12   ` Darko Volaric
1994-12-29 22:27     ` Bob Hetzel
1994-12-31 16:10       ` cdlevin
1995-01-02 13:55         ` Steven Buytaert
1995-01-04  5:16           ` Ross Morley
1995-01-04 16:04             ` Jim_Mann
1995-01-05  0:01               ` copy *.doc *.bak (Was: Re: The big Question) Rick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox