[comp.sys.amiga.tech] Wildcard types

smp@myamiga.UUCP (Steve Palm) (10/30/90)

There was a message a while back that someone didn't like ARP becuase they 
didn't follow Commodore's standards, like wilcard format.  Personally I use 
the wildcard set supplied by Commodore and get along with it just fine.  
However....
 
I recently received my AmigaVision package.  If you look in the manual, page
3-42, "you can use the wildcard characters * and ?".  Gee...  Commodore 
doesn't even support it's own defined standard wildcards.  NOW who broke the 
standards?

Again, on page 5-6, it only mentions wildcards * and ?.  It seems to me that 
if Commodore wants things to be the same (which I *highly* endorse), they 
should utilize their own standard wildcard characters.  Adding additional 
characters to this set is fine, but at least support the base set.


--  
     ///  AMIGA: | Steve Palm, Sysop of FidoNet node 1:11/16
    ///  FOR THE | UUCP: {gatech,ames,rutgers}!ncar!asuvax!stjhmc!myamiga!smp
\\\///  CREATIVE | INTERNET: [not yet available]
 \XX/     MIND   |_________________________________________________________ 

252u3130@fergvax.unl.edu (Phil Dietz) (11/01/90)

Well it's about due!  I personally HATE the #? qualifier.  Boy what a
wierd combination.  It's only like UNIX and the IBM world (billions and
billions by Carl Sagan) users use the STANDARD * wildcard.
 
Jeesh...Why didn't Commodore support the !@#$%^&* wild card instead.  We
all love enteringin the oodles of characters to represent an entity
represented by * everywhere else.
 
"ARP is great, but sex can't wait."

<<<=================--------- Cheap Ad ---------===================<<<
Phil Dietz                       SWL Lincoln    565 MEGS! 2 lines
252u3130@fergvax.unl.edu         (402)421-1963  AMIGA, IBM, MAC, GIFS
    IBM'ers and Mac'ers are shopping for a life.  Amiga the best!

peter@sugar.hackercorp.com (Peter da Silva) (11/01/90)

In article <1990Nov01.061846.27994@hoss.unl.edu> 252u3130@fergvax.unl.edu (Phil Dietz) writes:
> Well it's about due!  I personally HATE the #? qualifier.

No, it's the # qualifier. Ever hear of regular expressions?
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

andy@cbmvax.commodore.com (Andy Finkel) (11/01/90)

In article <1990Nov01.061846.27994@hoss.unl.edu> 252u3130@fergvax.unl.edu (Phil Dietz) writes:
>Well it's about due!  I personally HATE the #? qualifier.  Boy what a
>wierd combination.  It's only like UNIX and the IBM world (billions and
>billions by Carl Sagan) users use the STANDARD * wildcard.
> 
>Jeesh...Why didn't Commodore support the !@#$%^&* wild card instead.  We
>all love enteringin the oodles of characters to represent an entity
>represented by * everywhere else.

Ah, the eternal debate.  This, and setting the filedate on COPY :-)

1.  typing #? instead of * isn't that hard.

2.  Amiga wildcards are regular expressions, more powerful than
    the simple PC *

3.  2.0 dos.library has a bit which, if you set it, makes * a synonym for #?


BTW, in the book _Cyteen_,  the main computer uses AmigaDOS wildcards...

			andy
-- 
andy finkel		{uunet|rutgers|amiga}!cbmvax!andy
Commodore-Amiga, Inc.

"It is much easier to suggest solutions when you know nothing about the
 problem."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

jdickson@jato.jpl.nasa.gov (Jeff Dickson) (11/02/90)

Newsgroups: comp.sys.amiga.tech
Subject: Re: Wildcard types
Summary: 
Expires: 
References: <87.272D0968@myamiga.UUCP> <1990Nov01.061846.27994@hoss.unl.edu>
Sender: 
Reply-To: jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson)
Followup-To: 
Distribution: 
Organization: Jet Propulsion Laboratory, Pasadena, CA
Keywords: 


	I too despise CBM's choice of wild card characters, although '#' is
more logical than '*'. I've gotten used to it by now, but my largest comp-
laint is that there is no current directory character ala UNIX. Under UNIX
if you want to copy a file elsewhere to the current directory you can easily
state '.' as in:

	copy /usr/local/bin/somefile .

	Under AmigaDOS you have to use the actual name or more of some kind
of convoluted name (slashes '/' and subdirectory names). 

	Lets be careful not to put IBM PC's above Amigas (in this respect).
At least Amiga's use the same subdirectory seperatiion character that UNIX 
does '/'! Why on earth did IBM choose to use back slashes '\' instead? How
retarded!

						Jeff

drtiller@uokmax.ecn.uoknor.edu (Donald Richard Tillery Jr) (11/02/90)

That's funny, whenever I want to copy a file to the current directory I just
type:

copy DEV:director/file ""

and it is in there with me.

Rick Tillery

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (11/02/90)

In <87.272D0968@myamiga.UUCP>, smp@myamiga.UUCP (Steve Palm) writes:
>There was a message a while back that someone didn't like ARP becuase they 
>didn't follow Commodore's standards, like wilcard format.  Personally I use 
>the wildcard set supplied by Commodore and get along with it just fine.  
>However....
> 
>I recently received my AmigaVision package.  If you look in the manual, page
>3-42, "you can use the wildcard characters * and ?".  Gee...  Commodore 
>doesn't even support it's own defined standard wildcards.  NOW who broke the 
>standards?

Not CBM, though I suspect you are thinking they did.

>Again, on page 5-6, it only mentions wildcards * and ?.  It seems to me that 
>if Commodore wants things to be the same (which I *highly* endorse), they 
>should utilize their own standard wildcard characters.  Adding additional 
>characters to this set is fine, but at least support the base set.

They support the standard Amigados wildcards an _optionally_ support the '*' as
a substitute (synonym) for '#?'.

-larry


--
It is not possible to both understand and appreciate Intel CPUs.
    -D.Wolfskill
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (11/02/90)

In <1990Nov01.061846.27994@hoss.unl.edu>, 252u3130@fergvax.unl.edu (Phil Dietz) writes:
>Well it's about due!  I personally HATE the #? qualifier.  Boy what a
>wierd combination.  It's only like UNIX and the IBM world (billions and
>billions by Carl Sagan) users use the STANDARD * wildcard.
> 
>Jeesh...Why didn't Commodore support the !@#$%^&* wild card instead.  We
>all love enteringin the oodles of characters to represent an entity
>represented by * everywhere else.

So which '*' wildcard convention should they have adopted? The Unix and MsDos
ones are completely and totally different. Or hadn't you noticed?

-larry

--
It is not possible to both understand and appreciate Intel CPUs.
    -D.Wolfskill
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (11/02/90)

In <1990Nov1.181023.21485@jato.jpl.nasa.gov>, jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
>
>	I too despise CBM's choice of wild card characters, although '#' is
>more logical than '*'. I've gotten used to it by now, but my largest comp-
>laint is that there is no current directory character ala UNIX. Under UNIX
>if you want to copy a file elsewhere to the current directory you can easily
>state '.' as in:
>
>	copy /usr/local/bin/somefile .
>
>	Under AmigaDOS you have to use the actual name or more of some kind
>of convoluted name (slashes '/' and subdirectory names). 

Under Amigados, you can use:

 copy /usr/local/bin/somefile ""

>	Lets be careful not to put IBM PC's above Amigas (in this respect).

Let's be careful to know what we are talking about before falsely accusing the
Amiga of shortcomings.

-larry

--
It is not possible to both understand and appreciate Intel CPUs.
    -D.Wolfskill
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+

new@ee.udel.edu (Darren New) (11/02/90)

In article <1990Nov1.181023.21485@jato.jpl.nasa.gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson) writes:
>[...] but my largest comp-
>laint is that there is no current directory character ala UNIX. 

The current directory can be specified by giving an empty file name.
Therefore, you can just say

  copy sys:here/there/everywhere ""

and everywhere will show up here.  This is actually much more logical and
regular than UNIX (just like #? is more logical and regular) even if slightly
less convenient (ibid).                   -- Darren
-- 
--- Darren New --- Grad Student --- CIS --- Univ. of Delaware ---
----- Network Protocols, Graphics, Programming Languages, 
      Formal Description Techniques (esp. Estelle), Coffee -----

yarnall@opusc.csd.scarolina.edu (Ken Yarnall) (11/02/90)

In article <1990Nov1.181023.21485@jato.jpl.nasa.gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson) writes:
+
+	I too despise CBM's choice of wild card characters, although '#' is
+more logical than '*'.

But they don't mean the same thing!  `*' in Un*x means `match 0 or more
characters, while `#' in AmigaOS means `Match 0 or more occurences of the
next item', where `item' can be quite general.  So, `#?" matches 0 or more
characters, but `#p' matches 0 or more p's, #(a|b|c) matches 0 or more a,s or
b's or c's.  Potentially more powerful, eh?

+			 I've gotten used to it by now, but my largest comp-
+laint is that there is no current directory character ala UNIX. Under UNIX
+if you want to copy a file elsewhere to the current directory you can easily
+state '.' as in:
+
+	copy /usr/local/bin/somefile .
+
+	Under AmigaDOS you have to use the actual name or more of some kind
+of convoluted name (slashes '/' and subdirectory names). 

Try
	copy :usr/local/bin/somefile ""

+	Lets be careful not to put IBM PC's above Amigas (in this respect).
+At least Amiga's use the same subdirectory seperatiion character that UNIX 
+does '/'! Why on earth did IBM choose to use back slashes '\' instead? How
+retarded!

And, of course, Un*x is the One True Word, and anyone who says different is
commiting heresy.  Geez, let's get our collective heads out of the sand and 
be a little open to new things.  If no one ever changes the way things are 
done, they'll never get any better.

+						Jeff

  -ken

-- 
     Ken Yarnall                 ///   yarnall@usceast.cs.scarolina.EDU
      Math Department, USC   \\\///   yarnall@ucseast.UUCP
       Columbia, S.C. 29208   \\\/   (803)777-5218
    `You'd better tie me up.' -- from the movie, "Tie Me Up, Tie Me Down"

bj@cbmvax.commodore.com (Brian Jackson) (11/02/90)

In article <1990Nov1.181023.21485@jato.jpl.nasa.gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson) writes:
>
>	I too despise CBM's choice of wild card characters, although '#' is
>more logical than '*'. I've gotten used to it by now, but my largest comp-
>laint is that there is no current directory character ala UNIX. Under UNIX
>if you want to copy a file elsewhere to the current directory you can easily
>state '.' as in:
>
>	copy /usr/local/bin/somefile .
>
>	Under AmigaDOS you have to use the actual name or more of some kind
>of convoluted name (slashes '/' and subdirectory names). 

Not so, unless you consider "" convoluted.  The way to do this is :

	copy /usr/local/bin/somefile ""

Works like a champ.

>						Jeff

 -----------------------------------------------------------------------
 | Brian Jackson  Software Engineer, Commodore-Amiga Inc.  GEnie: B.J. |
 | bj@cbmvax.cbm.commodore.com    or  ...{uunet|rutgers}!cbmvax!bj     |
 | "Seek simplicity, and distrust it."                                 |
 ----------------------------------------------------------------------- 

peterk@cbmger.UUCP (Peter Kittel GERMANY) (11/02/90)

In article <1990Nov1.181023.21485@jato.jpl.nasa.gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson) writes:
>, but my largest comp-
>laint is that there is no current directory character ala UNIX. Under UNIX
>if you want to copy a file elsewhere to the current directory you can easily
>state '.' as in:
 
Yes, and under Amiga you use "":

	copy /usr/local/bin/somefile  ""

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk

lrg7030@uxa.cso.uiuc.edu (Loren Rittle) (11/02/90)

> Statement that AmigaOS has no way to specify the
> current directory!

This was to be a mail reply, but I decided that more people
might be interested in the answer:

AmigaOS does indeed have a way to specify the current directory:
(Drum roll please...)
                          ""

That is right whereas in UNIX we say cp <file1> <file2> .
in AmigaOS we say, copy ram:test "".
This command will copy the file ram:test to the current directory
under the same name test.
By the way, under UNIX we can say cp /tmp/xx "" and this
too will copy the file xx to the current directory!
Neat!

Regards,
Loren J. Rittle

mrush@ecst.csuchico.edu (Matt "C P." Rush) (11/03/90)

In article <1990Nov1.184331.5484@uokmax.ecn.uoknor.edu> drtiller@uokmax.ecn.uoknor.edu (Donald Richard Tillery Jr) writes:
>That's funny, whenever I want to copy a file to the current directory I just
>type:
>
>copy DEV:director/file ""
>
>and it is in there with me.

	What's this?!?  Somebody actual READ THE MANUAL?!?  Buy this gentleman
a (insert desirable object here)!

>Rick Tillery

	Will miracles never cease...

	-- Matt

bleys@tronsbox.xei.com (Bill Cavanaugh) (11/03/90)

This wildcard argument is one of those things that can go on forever...

Like all-but-one-person I know, the ONLY time I've ever used a wildcard,
it's been #?.  Regular expressions ARE more powerful, but for most of us,
they're also unnecessary.  The * is familiar to tens of millions of computer
users around the world;  why not make it available?  I'm using ARP, which
supports both wildcard types, and gives us the best of both worlds.

Just my two cents...

/****************************************************************
 *          All of the above copyright by the below.            *
 *         Bill Cavanaugh       uunet!tronsbox!bleys            *
 *    "A language is a dialect with an army and a navy."        *
 ****************************************************************/

jdp@caleb.UUCP (Jim Pritchett) (11/03/90)

[]
In article <1990Nov1.181023.21485@jato.jpl.nasa.gov>
jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:

> Under AmigaDOS you have to use the actual name or more of some kind
> of convoluted name (slashes '/' and subdirectory names).

Actually, you can usually use double quotes to indicate the current
directory.

e.g.  copy df0:testfile ""

so, it is not quite as bad as:

copy df0:testfile /whatevermycurrentdirectorynameis


I hope this helps.  (I didn't know about it for quite a while...)




--

                                                Jim Pritchett


UUCP:  texsun.central.sun.com!letni!rwsys!caleb!jdp
 or    letni.lonestar.org!dms3b1!caleb!jdp

bleys@tronsbox.xei.com (Bill Cavanaugh) (11/03/90)

>+	Lets be careful not to put IBM PC's above Amigas (in this respect).
>+At least Amiga's use the same subdirectory seperatiion character that UNIX 
>+does '/'! Why on earth did IBM choose to use back slashes '\' instead? How
>+retarded!
>
>And, of course, Un*x is the One True Word, and anyone who says different is
>commiting heresy.  Geez, let's get our collective heads out of the sand and 
>be a little open to new things.  If no one ever changes the way things are 
>done, they'll never get any better.
>
>+						Jeff
>
>  -ken
>
>-- 
>     Ken Yarnall                 ///   yarnall@usceast.cs.scarolina.EDU
>      Math Department, USC   \\\///   yarnall@ucseast.UUCP
>       Columbia, S.C. 29208   \\\/   (803)777-5218
>    `You'd better tie me up.' -- from the movie, "Tie Me Up, Tie Me Down"
>

Again, an argument that can go on forever.  Just from a practical typing
standpoint, the / makes more sense than the \, since it's more conveniently
placed on the keyboard.  Probably the same reason IBM moved the " from over
the 2 all those years ago...

/****************************************************************
 *          All of the above copyright by the below.            *
 *         Bill Cavanaugh       uunet!tronsbox!bleys            *
 *    "A language is a dialect with an army and a navy."        *
 ****************************************************************/

xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) (11/03/90)

lrg7030@uxa.cso.uiuc.edu (Loren  Rittle) writes:
[somebody else is paraphrased as writing:]
>> Statement that AmigaOS has no way to specify the
>> current directory!
>
>This was to be a mail reply, but I decided that more people
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>might be interested in the answer:

Nothing particular against Loren here, but this is a large part of the
trouble with reading the c.s.a.* groups.  I think so far I've counted
nine responses to this one.

Please, when someone makes an OBVIOUS error, as I did recently in
answering Larry Phillips posting about the condition codes not being set
to correspond to the returned value in D0 after a subroutine call*,
REALIZE that the error is an obvious one, one that DOZENS of other
people are going to catch too, RESIST the urge to see your name in print
with a "gotcha" posting, EMAIL your correction, and depend on the
originator of the error to publish the correction; become one of the
unsung saints of the net.

Post only in response to subtle errors; then you may well be the only
poster, and subtle errors spread insideously. Remember, though, what
seems subtle to you might still be obvious to the other dozens, so email
is safest.

*(In my defense, there wasn't enough context in the (trimmed down)
article to which I responded to indicate it _was_ a subroutine call
being referenced, so I thought it was a return from a context switch.
Yes, I should have known better, Larry doesn't make that level of
mistakes.)

Kent, the man from xanth.
<xanthian@Zorch.SF-Bay.ORG> <xanthian@well.sf.ca.us>
--
Canonization imminent; I _emailed_ _my_ correction.  ;-)

didierj@swindj.UUCP (Alain Didierjean) (11/03/90)

In article <1990Nov1.181023.21485@jato.jpl.nasa.gov>, Jeff Dickson writes:

->
->      I too despise CBM's choice of wild card characters, although '#' is
-> more logical than '*'. I've gotten used to it by now, but my largest comp-
-> laint is that there is no current directory character ala UNIX. Under UNIX
-> if you want to copy a file elsewhere to the current directory you can easily
-> state '.' as in:
->
->      copy /usr/local/bin/somefile .
->
->      Under AmigaDOS you have to use the actual name or more of some kind
-> of convoluted name (slashes '/' and subdirectory names).


Did yoy ever try :

        copy /usr/local/bin/somefile ""

True, that's one character more than under Unix...
It's documented too...

->                                              Jeff

    Alain DIDIERJEAN
    The Software Winery     ...cbmvax!cbmehq!cbmfra!swindj!didierj

    You know what ?  I'm happy

yarnall@opusc.csd.scarolina.edu (Ken Yarnall) (11/04/90)

In article <27327934-a33.13comp.sys.amiga.tech-1@tronsbox.xei.com> bleys@tronsbox.xei.com (Bill Cavanaugh) writes:
+
+Again, an argument that can go on forever.  Just from a practical typing
+standpoint, the / makes more sense than the \, since it's more conveniently
+placed on the keyboard.  Probably the same reason IBM moved the " from over
+the 2 all those years ago...

I wish someone had mentioned that to Don Knuth before he started on TeX...

+ *         Bill Cavanaugh       uunet!tronsbox!bleys            *

  -ken
-- 
     Ken Yarnall                 ///   yarnall@usceast.cs.scarolina.EDU
      Math Department, USC   \\\///   yarnall@ucseast.UUCP
       Columbia, S.C. 29208   \\\/   (803)777-5218
    `You'd better tie me up.' -- from the movie, "Tie Me Up, Tie Me Down"

rbabel@babylon.UUCP (Ralph Babel) (11/04/90)

In article <15517@cbmvax.commodore.com>
andy@cbmvax.commodore.com (Andy Finkel) writes:

> 2. Amiga wildcards are regular expressions, more powerful
>    than the simple PC *

Since Ada is much more powerful than the AmigaDOS script
language, I'd like to see Ada as part of the AmigaShell.

> BTW, in the book _Cyteen_,  the main computer uses
> AmigaDOS wildcards...

... implemented in BCPL using TRIPOS? :-)

Ralph

rbabel@babylon.UUCP (Ralph Babel) (11/04/90)

In article <27327934-a33.13comp.sys.amiga.tech-1@tronsbox.xei.com>
bleys@tronsbox.xei.com (Bill Cavanaugh) writes:

> Just from a practical typing standpoint, the / makes more
> sense than the \, since it's more conveniently placed on
> the keyboard.

Unless you're using a French, German, Italian or Spanish keyboard :-(

Ralph

aduncan@rhea.trl.oz (Allan Duncan) (11/05/90)

From article <15517@cbmvax.commodore.com>, by andy@cbmvax.commodore.com (Andy Finkel):
> Ah, the eternal debate.  This, and setting the filedate on COPY :-)
> 
> 1.  typing #? instead of * isn't that hard.

Yes, it's a miserable combination - you gotta change both hands on two
keys each!  With my accuracy of touch typing, it means I've got to stop
and look _every_ time. :-)

> 2.  Amiga wildcards are regular expressions, more powerful than
>     the simple PC *

No, they are _part_ of regular expressions, the rest of which we weren't
given.  Also, they are not interpreted by the shell, so you can never be
sure in advance if the program you were invoking supported them.
Allan Duncan	ACSnet	a.duncan@trl.oz
(03) 541 6708	ARPA	a.duncan%trl.oz.au@uunet.uu.net
		UUCP	{uunet,hplabs,ukc}!munnari!trl.oz!a.duncan
Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.

aduncan@rhea.trl.oz (Allan Duncan) (11/05/90)

From article <15532@cbmvax.commodore.com>, by bj@cbmvax.commodore.com (Brian Jackson):
> Not so, unless you consider "" convoluted.  The way to do this is :

				  YES !
> 
> 	copy /usr/local/bin/somefile ""


Allan Duncan	ACSnet	a.duncan@trl.oz
(03) 541 6708	ARPA	a.duncan%trl.oz.au@uunet.uu.net
		UUCP	{uunet,hplabs,ukc}!munnari!trl.oz!a.duncan
Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.

jerry@truevision.com (Jerry Thompson) (11/06/90)

Read the next reply, to see if the question has been answered.  If it 
wasn't, then just press - to jump back to the last message read and reply.
-- 
Jerry Thompson                 |     // checks  ___________   | "I'm into S&M,
"What I want to know is, have  | \\ //   and    |    |    |   |  Sarcasm and
 you ever seen Claude Rains?"  |  \X/ balances /_\   |   /_\  |  Mass Sarcasm."

andy@cbmvax.commodore.com (Andy Finkel) (11/06/90)

In article <2439@trlluna.trl.oz> aduncan@rhea.trl.oz (Allan Duncan) writes:
>No, they are _part_ of regular expressions, the rest of which we weren't
>given.  

(Hmm, I could swear that #? was a regular expression, as well
as part of regular expressions.)

They are documented in the AmigaDOS manual, available from Bantam books.
(you can also find them in the A3000 System Software manual if you
 have a 3000)

>Also, they are not interpreted by the shell, so you can never be
>sure in advance if the program you were invoking supported them.

Not having wildcard expansion for every command is a *feature*.
(I can say this because the dos wildcard routines
 are available via standard DOS calls in 2.0 :-)  )

 A mail command, for instance...mailing to all the people
 whose names correspond to filenames in a directory is
 a seldom utilized ability of csh. :-)

>Allan Duncan	ACSnet	a.duncan@trl.oz

		andy
-- 
andy finkel		{uunet|rutgers|amiga}!cbmvax!andy
Commodore-Amiga, Inc.

"It is much easier to suggest solutions when you know nothing about the
 problem."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) (11/07/90)

In article <1990Nov1.181023.21485@jato.jpl.nasa.gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson) writes:
>	I too despise CBM's choice of wild card characters, although '#' is
>more logical than '*'. I've gotten used to it by now, but my largest comp-
>laint is that there is no current directory character ala UNIX. Under UNIX
>if you want to copy a file elsewhere to the current directory you can easily
>state '.' as in:

The AMIGADOS equivalent of "current directory"  is "" (ie the null string)
so the command 
	1> Copy df0:foo ""
	
will copy the file foo to the current directory. Note this only works
reliably on 1.3 and later systems. 


--
--Chuck McManis						    Sun Microsystems
uucp: {anywhere}!sun!cmcmanis   BIX: <none>   Internet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"I tell you this parrot is bleeding deceased!"

joseph@valnet.UUCP (Joseph P. Hillenburg) (11/07/90)

rbabel@babylon.UUCP (Ralph Babel) writes:

> In article <15517@cbmvax.commodore.com>
> andy@cbmvax.commodore.com (Andy Finkel) writes:
> 
> > 2. Amiga wildcards are regular expressions, more powerful
> >    than the simple PC *
> 
> Since Ada is much more powerful than the AmigaDOS script
> language, I'd like to see Ada as part of the AmigaShell.

No! We don't need Ada. This is what we have ARexx for. ARexx is much more 
powerful than Ada in that is allows direct control of existing processes.
> 
> Ralph


-Joseph Hillenburg

UUCP: ...iuvax!valnet!joseph
ARPA: valnet!joseph@iuvax.cs.indiana.edu
INET: joseph@valnet.UUCP

GB03@Lehigh (11/07/90)

RE. Wildcards

Please note that the * notation is the standard notation used by those
who study languages and finite state machines.  This was defined by
Kleene.  It is used to denote any number of characters in the alphabet
of a machine. i.e. 0,1,2....  The notation + is used to indicate 1 or
more members of thye machines alphabet.

Those who are interested in FSA would prefer the notation (..)* as a
wildcard for any match and (c)* for matching any number of c's.

Perrsonally on a real machine I am partial to * ala I*M and #C ala AMY.

bruce@zuhause.MN.ORG (Bruce Albrecht) (11/08/90)

>In article <18267083.ARN03721@swindj.UUCP> didierj@swindj.UUCP (Alain Didierjean) writes:
[complaint that current directory has no abbreviation like . in Unix deleted]
>Did yoy ever try :
>
>        copy /usr/local/bin/somefile ""
>
>True, that's one character more than under Unix...
>It's documented too...

Where is it documented?  I scanned the "Using The System Software" manual provided with
the 3000, and was unable to find it mentioned anywhere.  I still would know unless it
had been posted here.
--


bruce@zuhause.mn.org	   

markv@kuhub.cc.ukans.edu (11/08/90)

> 	I too despise CBM's choice of wild card characters, although '#' is
> more logical than '*'. I've gotten used to it by now, but my largest comp-
> laint is that there is no current directory character ala UNIX. Under UNIX
> if you want to copy a file elsewhere to the current directory you can easily
> state '.' as in:
> 
> 	copy /usr/local/bin/somefile .
> 
> 	Under AmigaDOS you have to use the actual name or more of some kind
> of convoluted name (slashes '/' and subdirectory names). 

Hmm, AmigaDOS does have a current directory charecter(pair).  Try:

	copy SYS:local/bin/somefile ""

> 	Lets be careful not to put IBM PC's above Amigas (in this respect).
> At least Amiga's use the same subdirectory seperatiion character that UNIX 
> does '/'! Why on earth did IBM choose to use back slashes '\' instead? How
> retarded!

Agreed.  I also never understood the reasons for having a true
directory entry for ".." and ".". 

> 						Jeff

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\    Good Cheer !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  markgood	      \\\  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: markv@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

bj@cbmvax.commodore.com (Brian Jackson) (11/09/90)

In article <bruce.4296@zuhause.MN.ORG> bruce@zuhause.MN.ORG (Bruce Albrecht) writes:

>>        copy /usr/local/bin/somefile ""

>Where is it documented?  I scanned the "Using The System Software" manual provided with
>the 3000, and was unable to find it mentioned anywhere.  I still would know unless it
>had been posted here.

This is documented in the COPY command docs in the above-named manual (Page
8-26 in the one I have)... "You can also use a pair of quotes with nothing
between ("") to refer to the current directory when specifying a
destination." 

It's also on Page 2-7 of the 1.3 Enhancer Manual.

bj

>bruce@zuhause.mn.org	   

 -----------------------------------------------------------------------
 | Brian Jackson  Software Engineer, Commodore-Amiga Inc.  GEnie: B.J. |
 | bj@cbmvax.cbm.commodore.com    or  ...{uunet|rutgers}!cbmvax!bj     |
 | "Huh?"  - Lao-Tse                                                   |
 -----------------------------------------------------------------------

andy@cbmvax.commodore.com (Andy Finkel) (11/09/90)

In article <bruce.4296@zuhause.MN.ORG> bruce@zuhause.MN.ORG (Bruce Albrecht) writes:
>>In article <18267083.ARN03721@swindj.UUCP> didierj@swindj.UUCP (Alain Didierjean) writes:
>[complaint that current directory has no abbreviation like . in Unix deleted]
>>Did yoy ever try :
>>
>>        copy /usr/local/bin/somefile ""
>>
>Where is it documented?  I scanned the "Using The System Software" manual provided with
>the 3000, and was unable to find it mentioned anywhere.  I still would know unless it
>had been posted here.

Page 8-26, in the COPY command description.

>bruce@zuhause.mn.org	   


Some info that wasn't in the current manual is that we support
a not operator ( a ~) and character classes (delimited by [ and ] ) in
wildcard expansion.  So you can say things like

list [a-c]#?

or 

list ~([a-c]#?)

(not effects the next token, so its best to use parens )

			andy

-- 
andy finkel		{uunet|rutgers|amiga}!cbmvax!andy
Commodore-Amiga, Inc.

"It is much easier to suggest solutions when you know nothing about the
 problem."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

abrown@hpcvca.CV.HP.COM (Allen Brown) (11/10/90)

> Agreed.  I also never understood the reasons for having a true
> directory entry for ".." and ".". 
> -- 
> Mark Gooderum			Only...		\    Good Cheer !!!

That is so the programs in Unix which work with directories (e.g. ls)
do not have to have special code to deal with "." and "..".
--
  Allen Brown  abrown@cv.hp.com or abrown%hpcvca@hplabs.hp.com
	    or hplabs!hpcvca!abrown or "Hey you!"
  Not representing my employer.
  "No matter where you go... there you are." --- Buckaroo Bonzai

hclausen@adspdk.UUCP (Henrik Clausen) (11/13/90)

In article <15517@cbmvax.commodore.com>, Andy Finkel writes:

> Ah, the eternal debate.  This, and setting the filedate on COPY :-)
> 
> 1.  typing #? instead of * isn't that hard.

   Shifted characters on either side of the keyboard... sigh.

> 2.  Amiga wildcards are regular expressions, more powerful than
>     the simple PC *

   So true.

> 3.  2.0 dos.library has a bit which, if you set it, makes * a synonym for #?

   I've done a nice program to do this. It's mailed to the sources
moderator, 88 bytes executable and source in C.

   I might be pursuaded to mail a copy to interested parties.

> "It is much easier to suggest solutions when you know nothing about the
>  problem."

   And very easy to report problems if you know nothing about computers :-)


                                      -Henrik


|                       Henrik Clausen, Graffiti Data                    |
|           ...{pyramid|rutgers}!cbmvax!cbmehq!adspdk!hclausen           |
\__"Do not accept the heart that is the slave to reason" - Qawwali trad__/

peterk@cbmger.UUCP (Peter Kittel GERMANY) (11/14/90)

In article <1833d832.ARN03996@adspdk.UUCP> hclausen@adspdk.UUCP writes:
>In article <15517@cbmvax.commodore.com>, Andy Finkel writes:
>
>> Ah, the eternal debate.  This, and setting the filedate on COPY :-)
>> 
>> 1.  typing #? instead of * isn't that hard.
>
>   Shifted characters on either side of the keyboard... sigh.

Finally, there we with our German kyboards have an advantage :-)!
Both characters are on the far right of the keyboard, well, one
is shifted, one not, but this is not so very uncomfortable.

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk

rbabel@babylon.UUCP (Ralph Babel) (11/15/90)

In article <k7k9R5w163w@valnet> joseph@valnet.UUCP (Joseph
P. Hillenburg) writes:

>>> 2. Amiga wildcards are regular expressions, more powerful
>>>    than the simple PC *
>>
>> Since Ada is much more powerful than the AmigaDOS script
>> language, I'd like to see Ada as part of the AmigaShell.
>
> No! We don't need Ada. This is what we have ARexx for.
> ARexx is much more powerful than Ada in that is allows
> direct control of existing processes.

And I thought the :-) was redundant in this case.

:-(

Ralph

rick@gtisqr.uucp (Hendrik Groeneveld) (11/17/90)

In article <15620@cbmvax.commodore.com> andy@cbmvax.commodore.com (Andy Finkel) writes:
>In article <2439@trlluna.trl.oz> aduncan@rhea.trl.oz (Allan Duncan) writes:

>>Also, they are not interpreted by the shell, so you can never be
>>sure in advance if the program you were invoking supported them.
>
>Not having wildcard expansion for every command is a *feature*.
>(I can say this because the dos wildcard routines
> are available via standard DOS calls in 2.0 :-)  )
>

Adding wildcard expansion as a DOS call is an improvement, but
expansion is the shells job. If I don't want somthing expanded
by the shell, I'll quote it. IMHO, if the shell doesn't do wildcard
expansion, it's a *bug*, not a feature. :-(

--
Rick Groeneveld				UUCP: {smart-host}!gtisqr!rick
Software Engineer			Bell: (206) 742-9111
Global Technology Intl. Inc.
Mukilteo Washington.

limonce@pilot.njin.net (Tom Limoncelli) (11/17/90)

In article <1990Nov16.171451.5668@gtisqr.uucp> rick@gtisqr.uucp (Hendrik Groeneveld) writes:

> Adding wildcard expansion as a DOS call is an improvement, but
> expansion is the shell's job. If I don't want somthing expanded
      ^^^^^^^^^^^^^^^^^^^^^^^
> by the shell, I'll quote it. IMHO, if the shell doesn't do wildcard
> expansion, it's a *bug*, not a feature. :-(

...and before someone else posts it:  ALL THE WORLD IS NOT UNIX!

(SETQ SARCASM-MODE ON)

"Hello God?"
"Yes my worshiper."
"I've found a computer that doesn't do everything exactly like UNIX."
"That's horrid!  *ZAAAAAP*!   There, there.  It won't bother you any more."
"Thanks."

(SETQ SARCASM-MODE OFF)

What are you talking about?  There is no required place for wildcard
expansion.  This topic comes up every so often.  There benefits and
problems with both.

For example, you claim that if you don't want something expanded
you'll quote it.  You've now make everything-in-the-world-except-
files into a special case.  How dare you assume that most of my
commands deal with files.

Let's end this topic or take it to alt.religion.computers where it
belongs.

ALL THE WORLD IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!  ALL THE WORLD
IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!

-Tom
-- 
tlimonce@drew.edu     Tom Limoncelli      "Flash!  Flash!  I love you!
tlimonce@drew.bitnet  +1 201 408 5389        ...but we only have fourteen
tlimonce@drew.uucp    limonce@pilot.njin.net       hours to save the earth!"

jap@convex.cl.msu.edu (Joe Porkka) (11/17/90)

rick@gtisqr.uucp (Hendrik Groeneveld) writes:

>In article <15620@cbmvax.commodore.com> andy@cbmvax.commodore.com (Andy Finkel) writes:
>>In article <2439@trlluna.trl.oz> aduncan@rhea.trl.oz (Allan Duncan) writes:


>Adding wildcard expansion as a DOS call is an improvement, but
>expansion is the shells job. If I don't want somthing expanded
>by the shell, I'll quote it. IMHO, if the shell doesn't do wildcard
>expansion, it's a *bug*, not a feature. :-(

What happens when your wildcard matches 5000 files? makes for an
awful LONG command line. (/bin/csh in UNIX simply complains
about line to long and aborts)

What do you do when you want to match * */* */*/* ..... without
knowing how deep you need to go? (this can be fixed by doing something
like */.../* I suppose - but it aint done now).

If the command does it, it can interpret the ALL keyword.

In general its better for the command to handle expansion since it
"knows" which args are filenames. If you don't like it then
you are free to use a different shell.

limonce@pilot.njin.net (Tom Limoncelli) (11/17/90)

In article <1990Nov16.171451.5668@gtisqr.uucp> rick@gtisqr.uucp (Hendrik Groeneveld) writes:

> Adding wildcard expansion as a DOS call is an improvement, but
> expansion is the shell's job. If I don't want somthing expanded
      ^^^^^^^^^^^^^^^^^^^^^^^
> by the shell, I'll quote it. IMHO, if the shell doesn't do wildcard
> expansion, it's a *bug*, not a feature. :-(

All the world is not UNIX.

(SETQ SARCASM-MODE ON)

"Hello God?"
"Yes my worshiper."
"I've found a computer that doesn't do everything exactly like UNIX."
"That's horrid!  *ZAAAAAP*!   There.  It won't bother you any more."
"Thanks."

(SETQ SARCASM-MODE OFF)

What are you talking about?  There is no required place for wildcard
expansion.  This topic comes up every so often.  There are benefits
and problems with both.

For example, you claim that if you don't want something expanded
you'll quote it.  You've now make everything-in-the-world-except-
files into a special case.  How dare you assume that most of my
commands deal with files that currently exist or files at all!

Let's end this topic or take it to alt.religion.computers where it
belongs.

ALL THE WORLD IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!  ALL THE WORLD
IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!

-Tom
-- 
tlimonce@drew.edu     Tom Limoncelli      "Flash!  Flash!  I love you!
tlimonce@drew.bitnet  +1 201 408 5389        ...but we only have fourteen
tlimonce@drew.uucp    limonce@pilot.njin.net       hours to save the earth!"
-- 
tlimonce@drew.edu     Tom Limoncelli      "Flash!  Flash!  I love you!
tlimonce@drew.bitnet  +1 201 408 5389        ...but we only have fourteen
tlimonce@drew.uucp    limonce@pilot.njin.net       hours to save the earth!"

kim@uts.amdahl.com (Kim DeVaughn) (11/18/90)

In article <1990Nov16.234820.14783@msuinfo.cl.msu.edu> jap@convex.cl.msu.edu (Joe Porkka) writes:
> 
> What happens when your wildcard matches 5000 files? makes for an
> awful LONG command line. (/bin/csh in UNIX simply complains
> about line to long and aborts)

Recompile the shell, specifying a larger cmd line buffer.  I think we use
around 64K now on our UTS(tm) systems.


> What do you do when you want to match * */* */*/* ..... without
> knowing how deep you need to go? (this can be fixed by doing something
> like */.../* I suppose - but it aint done now).

Use "find" (several such cmds are available on the Amiga).


The biggest problem with leaving wildcard expansion up to each application
is that it means each application needs to do the job in exactly the same
way in order to provide a consistent environment.  And that is asking a lot,
IMO.  Minor issues like making each executable bigger, etc. can also be
mentioned, but are secondary (again, IMO).  [ And I do not mean to imply
that UNIX(R) is totally consistent in this regard ... :-) ]

With the shell doing the expansion, individual cmds need only be designed
to handle multiple agruments.


Now here's a question for you ... how many programs that are out there that
perform their own wildcard expansion will break when (and if) links to
directories are provided?  How long do you think it will be before all of
them get updated to account for the new feature (if ever)?

Granted, shells will need maintenance to accomodate such new features too,
but with shells doing the expansion, it only need to be done in ONE place
(per shell) with the change being "transparent" to (most) commands.


I realize this is a religious issue, and I'm not likely to change anyone's
mind ... much less AmigaShell's way of doing things, nor CBM's philosophy
on such issues, but every once-in-awhile I feel the need to proselytize
just a little bit.  Ah ... if only we'd had CAOS to begin with ...!


BTW, does the SetDate command handle wildcards under 2.0 ... of at least
multiple args?

/kim

-- 
UUCP:  kim@uts.amdahl.com   -OR-   ked01@juts.ccc.amdahl.com
  or:  {sun,decwrl,hplabs,pyramid,uunet,oliveb,ames}!amdahl!kim
DDD:   408-746-8462
USPS:  Amdahl Corp.  M/S 249,  1250 E. Arques Av,  Sunnyvale, CA 94086
BIX:   kdevaughn     GEnie:   K.DEVAUGHN     CIS:   76535,25

peter@sugar.hackercorp.com (Peter da Silva) (11/18/90)

In article <1990Nov16.234820.14783@msuinfo.cl.msu.edu> jap@convex.cl.msu.edu (Joe Porkka) writes:
> What happens when your wildcard matches 5000 files? makes for an
> awful LONG command line. (/bin/csh in UNIX simply complains
> about line to long and aborts)

That's the fault of the command line passing syntax.

> What do you do when you want to match * */* */*/* ..... without
> knowing how deep you need to go? (this can be fixed by doing something
> like */.../* I suppose - but it aint done now).

VMS does this with [...]. In that case I use "find". Calling in pipelines
isn't cheating. That way I can get all sorts of matching implemented without
having to have all the programs support it...
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

peter@sugar.hackercorp.com (Peter da Silva) (11/18/90)

[someone claims that wildcard expansion is the shell's job]

In article <Nov.16.18.45.09.1990.11701@pilot.njin.net> limonce@pilot.njin.net (Tom Limoncelli) writes:
> ALL THE WORLD IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!  ALL THE WORLD
> IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!  ALL THE WORLD IS NOT UNIX!

That's nice. Here, swallow the nice pill.

Feeling calmer?

I get the feeling that some people have a knee-jerk reaction to anything UNIX
does just because it's something UNIX does. One of these things is wildcards.
Another is filename expansion in the shell. I've even had people (back before
MS-DOS got them) claim hierarchical directories were a bad idea.

How about linefeed-seperated files? STREAM-LF files are only known in UNIX
and AmigaOS that I know of. Is that a bad idea, now?
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

bj@cbmvax.commodore.com (Brian Jackson) (11/18/90)

In article <a9rK02ZFe8RI01@amdahl.uts.amdahl.com> ked01@JUTS.ccc.amdahl.com (Kim DeVaughn) asks:

>BTW, does the SetDate command handle wildcards under 2.0 ... of at least
>multiple args?

Sure does.  Things like "SetDate foo:s* yesterday" work fine.

bj

>/kim

 -----------------------------------------------------------------------
 | Brian Jackson  Software Engineer, Commodore-Amiga Inc.  GEnie: B.J. |
 | bj@cbmvax.cbm.commodore.com    or  ...{uunet|rutgers}!cbmvax!bj     |
 | "My beer comes from farther away than your beer."                   |
 -----------------------------------------------------------------------

jesup@cbmvax.commodore.com (Randell Jesup) (11/19/90)

In article <ggk.658876544@tirith.UUCP> ggk@tirith.UUCP (Gregory Kritsch) writes:
>>In article <1990Nov16.171451.5668@gtisqr.uucp> rick@gtisqr.uucp (Hendrik Groeneveld) writes:
>
>>> expansion is the shell's job. If I don't want somthing expanded

>I can't resist doing this, but here's a totally bonkers thought for you.
>You know how there are various getarg()/getopt() type functions around
>for parsing argc/argv for a program?  Well, what if the template to that
>was stored in a special HUNK near the beginning of the load module.
>
>A shell could then get a command line from the user, strip out the first
>word (command name), load the template, parse the arguments acordingly
>(including filename expansion for specified multiple file arguments),
>and pass the results of the parsing to the program after it is loaded.

	Or, you could put the template in the program, and one of the first
things the program does is call the Dos routine that parses arguments, and
call the Dos routine that expands wildcards.  Suprise, guess what, these
calls are in the OS and the new C commands use them.

	Having the expansion done in the program does make the system somewhat
more flexible, and reduces the amount of quoting that users have to deal
with.  It's a tradeoff, of course, and there are thigns to be said for
both sides, but I think that when non-expert user interface issues are taken
into account the current system is best.

	BTW, the hunk idea is right out, due to loadfile compatibility issues.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com  BIX: rjesup  
Thus spake the Master Ninjei: "If your application does not run correctly,
do not blame the operating system."  (From "The Zen of Programming")  ;-)

davewt@NCoast.ORG (David Wright) (11/19/90)

In article <a9rK02ZFe8RI01@amdahl.uts.amdahl.com> ked01@JUTS.ccc.amdahl.com (Kim DeVaughn) writes:
>The biggest problem with leaving wildcard expansion up to each application
>is that it means each application needs to do the job in exactly the same
>way in order to provide a consistent environment.
> ......
>With the shell doing the expansion, individual cmds need only be designed
>to handle multiple agruments.
> ......
>Granted, shells will need maintenance to accomodate such new features too,
>but with shells doing the expansion, it only need to be done in ONE place
>(per shell) with the change being "transparent" to (most) commands.

	Haven't you ever programmed with ARP? One of the best things that
ARP did (and the only one that I wish was included in 2.0 (anyone know if
the source to gads() will be released seperately? (or added to 2.1???))) was
the removal of the clumsy argc/argv[] of normal C. ARP gave you PREPARSED
command lines. This meant that you could specify that argument 2 was a
switch, and no matter what order the user entered arguments to your program,
the arguments were parsed and placed in the correct "element" of the
argv[] array. If one of the arguments supported wildcards, that argument
returned a *pointer to another array*, which contained all the filenames
that matched. This meant that the APPLICATION programmer could decide on
how to handle wildcards, that the shell did not have to, and that the wildcard
code was in ONE PLACE, and changing/enhancing it would automatically fix the
programs that used it, as it was a shared library. Additionally, it
took care of allocating the memory to hold the file name array, and reading
the disk for the files to fill it, so the shell wasn't hung-up doing this
and could let you start up something else.

	Of all the features of ARP I wish were in 2.0, only the gads()
command line handler (and maybe their nice resource tracking features) are
really worth the effort, and are also the only reason I might still
consider using ARP for future products...


			Dave

peter@sugar.hackercorp.com (Peter da Silva) (11/19/90)

In article <1990Nov19.044047.850@NCoast.ORG> davewt@NCoast.ORG (David Wright) writes:
> 	Haven't you ever programmed with ARP? One of the best things that
> ARP did was the removal of the clumsy argc/argv[] of normal C. ARP gave
> you PREPARSED command lines.

Which is totally useless, because it breaks compatibility between your program
and every other C runtime in existence. If I write a command-line oriented
program, I'm going to want it to compile correctly and run on the Amiga and
UNIX... and probably DOS as well.

These days I just use "parseargs", which does the same thing but remains
compatible with existing C runtimes by operating on an argv and coming with
source code.
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

mwm@raven.relay.pa.dec.com (Mike (My Watch Has Windows) Meyer) (11/20/90)

In article <7085@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:
   In article <1990Nov19.044047.850@NCoast.ORG> davewt@NCoast.ORG (David Wright) writes:
   > 	Haven't you ever programmed with ARP? One of the best things that
   > ARP did was the removal of the clumsy argc/argv[] of normal C. ARP gave
   > you PREPARSED command lines.

   These days I just use "parseargs", which does the same thing but remains
   compatible with existing C runtimes by operating on an argv and coming with
   source code.

Is either one of these bright enough to do expansion against things
other than files? I'd love to be able to do:

break mem* c

to kill a collection of processes...

	<mike
--

peter@sugar.hackercorp.com (Peter da Silva) (11/20/90)

In article <MWM.90Nov19150423@raven.relay.pa.dec.com> mwm@raven.relay.pa.dec.com (Mike (My Watch Has Windows) Meyer) writes:
> Is either one of these bright enough to do expansion against things
> other than files? I'd love to be able to do:

> break mem* c

> to kill a collection of processes...

In principle, yes. For Parseargs you pass an array containing the command
name and single-character flag (so you can use the same argument description
in systems like UNIX and MS-DOS which use single-character flags, and in
AmigaOS and VMS which use keywords), the type, and the function to parse
that flag.

Just write the function. :->
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

jesup@cbmvax.commodore.com (Randell Jesup) (11/22/90)

In article <ggk.659154896@tirith.UUCP> ggk@tirith.UUCP (Gregory Kritsch) writes:
>Glad to hear "they're in there" finally at least.  I hope that they'll
>do Unix style flag parsing if asked (although I doubt it somehow). 

	Nope.  Standard ReadArgs (ala the c: commands) parsing, with a number
of extensions (/N for numbers, /M for multiple strings, etc).

>I really think that having the application program not handle any
>quoting or expansion would be a real plus.  That way, I can have the
>shell do expansion via my wildcards (Hey, I like the "mumble" wildcard
>better than '*' or '#?', ie: mumble.info representing all the files
>ending in .info), and I can depend on being able to pass all 256 ascii
>characters in command arguments, without worrying about the program not
>doing quoting.

	Standard quoting is handled by the ReadArgs function.  If this isn't
what the program wants, it can do whatever it wants with the command line
instead of, before, or after calling ReadArgs.  Personally, I feel that
expansion should be handled by the command for several reasons.  I prefer that
if a shell is doing expansion, it should do it when the user requests it (hits
some key, by command, whatever).  I once wrote a shell where you could
specify which commands would have the arguments expanded (or not expanded).
I ended up never using this, and instead I use user-initiated expansion.
This is, of course, a partially religious issue.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com  BIX: rjesup  
Thus spake the Master Ninjei: "If your application does not run correctly,
do not blame the operating system."  (From "The Zen of Programming")  ;-)

ggk@tirith.UUCP (Gregory Kritsch) (11/18/20)

limonce@pilot.njin.net (Tom Limoncelli) writes:
>In article <1990Nov16.171451.5668@gtisqr.uucp> rick@gtisqr.uucp (Hendrik Groeneveld) writes:

>> expansion is the shell's job. If I don't want somthing expanded
>      ^^^^^^^^^^^^^^^^^^^^^^^
>What are you talking about?  There is no required place for wildcard
>expansion.  This topic comes up every so often.  There benefits and
>problems with both.

I can't resist doing this, but here's a totally bonkers thought for you.
You know how there are various getarg()/getopt() type functions around
for parsing argc/argv for a program?  Well, what if the template to that
was stored in a special HUNK near the beginning of the load module.

A shell could then get a command line from the user, strip out the first
word (command name), load the template, parse the arguments acordingly
(including filename expansion for specified multiple file arguments),
and pass the results of the parsing to the program after it is loaded.
--
  Gregory Kritsch                          | University of Waterloo
    Fido:  1:221/208.11110  [1:163/109.30] | 1A Computer Engineering
    OCUG:  ggk@tirith.ocug.on.ca           |----------------------------
    UUCP:  ggk@tirith.UUCP                 | The University doesn't get
           ...!watmath!xenitec!tirith!ggk  | a chance to censor me!

ggk@tirith.UUCP (Gregory Kritsch) (11/21/20)

jesup@cbmvax.commodore.com (Randell Jesup) writes:
>	Or, you could put the template in the program, and one of the first
>things the program does is call the Dos routine that parses arguments, and
>call the Dos routine that expands wildcards.  Suprise, guess what, these
>calls are in the OS and the new C commands use them.

Glad to hear "they're in there" finally at least.  I hope that they'll
do Unix style flag parsing if asked (although I doubt it somehow). 

>	Having the expansion done in the program does make the system somewhat
>more flexible, and reduces the amount of quoting that users have to deal
>with.  It's a tradeoff, of course, and there are thigns to be said for
>both sides, but I think that when non-expert user interface issues are taken
>into account the current system is best.

I really think that having the application program not handle any
quoting or expansion would be a real plus.  That way, I can have the
shell do expansion via my wildcards (Hey, I like the "mumble" wildcard
better than '*' or '#?', ie: mumble.info representing all the files
ending in .info), and I can depend on being able to pass all 256 ascii
characters in command arguments, without worrying about the program not
doing quoting.

>	BTW, the hunk idea is right out, due to loadfile compatibility issues.

Hmm, if it's a 2.0 program, it requires 2.0 to run.  Judging from the
number of new toys in 2.0 I keep hearing about, I'd suggest that a
rather large number of programs will require it.

In any case, if a program requires the arg parsing you mention above, a
similar compatibility issue comes up - it's not backwards compatible to
1.3.  Neither is its load file.

>Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
>{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com  BIX: rjesup  
>Thus spake the Master Ninjei: "If your application does not run correctly,
>do not blame the operating system."  (From "The Zen of Programming")  ;-)
--
  Gregory Kritsch                          | University of Waterloo
    Fido:  1:221/208.11110  [1:163/109.30] | 1A Computer Engineering
    OCUG:  ggk@tirith.ocug.on.ca           |----------------------------
    UUCP:  ggk@tirith.UUCP                 | The University doesn't get
           ...!watmath!xenitec!tirith!ggk  | a chance to censor me!