[comp.sys.amiga.misc] How does one get * and ?

jeremym@chopin.udel.edu (Jeremy A Moskowitz) (03/17/91)

How does one get * and ? in 2.0??? (kinda reminiscient of the title, eh?)
 
I mean.. ya know.. i type delete * in  a directory, and it
tells me to 'eat wax tadpole'... so... I need wildcards...
 
I put my .39+ arp.library in the 2.0 libs directory, but BZZZZT.
That doesnt do it...
 
Can someone help me?
 
-j

-- 
E Pluribus //  Contacts: jeremym@brahms.udel.edu or jeremym@chopin.udel.edu or
  Unix    //		 jeremym@freezer.acs.udel.edu -amiga clasic 2000- 
      \\ // 	          --->Monitor of comp.sys.amiga.emulations<--- 
       \X/                2001 Dalmations - My stars, its full of dogs...

cpmwc@marlin.jcu.edu.au (Matt Crowd) (03/17/91)

In article <16680@chopin.udel.edu> jeremym@chopin.udel.edu (Jeremy A Moskowitz) writes:
>How does one get * and ? in 2.0??? (kinda reminiscient of the title, eh?)
> 
>E Pluribus //  Contacts: jeremym@brahms.udel.edu or jeremym@chopin.udel.edu or

The program you run to set the flag for * wildcars is at
ab20.larc.nasa.gov in the incoming/amiga dir., it's called
starburst.lzh.

In case you can't get to it, here is the code -

/** starburst.c
*
*   Toggles the bit that controls whether asterisk wildcards are allowed
*   or not. Thanks to Randall jesup!
*
*   W.G.J. Langeveld, July 1990.
*
**/
#include <exec/types.h>
#include <dos/dos.h>
#include <dos/dosextens.h>

struct DosLibrary *lib, *OpenLibrary();

main()
{
   lib = OpenLibrary("dos.library", 0L);

   ((struct RootNode *) (lib->dl_Root))->rn_Flags ^= 0x01000000;

   CloseLibrary(lib);

   exit(0);
}

matt crowd.

ewilts@janus.mtroyal.ab.ca (Ed Wilts) (03/20/91)

In article <1991Mar17.014929.1270@marlin.jcu.edu.au>, cpmwc@marlin.jcu.edu.au (Matt Crowd) writes:
> In article <16680@chopin.udel.edu> jeremym@chopin.udel.edu (Jeremy A Moskowitz) writes:
>>How does one get * and ? in 2.0??? (kinda reminiscient of the title, eh?)
>> 
>>E Pluribus //  Contacts: jeremym@brahms.udel.edu or jeremym@chopin.udel.edu or
> 
> The program you run to set the flag for * wildcars is at
> ab20.larc.nasa.gov in the incoming/amiga dir., it's called
> starburst.lzh.

This fixes part of the problem, but not all.  For example, a command such as:
	delete *
Will not delete anything, but
	delete :t/*
is valid.  It appears that the wildcard * can not appear by itself.  My
configuration is Kickstart 36.207/WB 36.69

-- 
        .../Ed     Preferrred:  Ed.Wilts@BSC.Galaxy.BCSystems.Gov.BC.CA
Ed Wilts            Alternate:  EdWilts@BCSC02.BITNET    (604) 389-3430
B.C. Systems Corp., 4000 Seymour Place, Victoria, B.C., Canada, V8X 4S8

ddyer@hubcap.clemson.edu (Doug Dyer) (03/20/91)

cpmwc@marlin.jcu.edu.au (Matt Crowd) writes:

>In article <16680@chopin.udel.edu> jeremym@chopin.udel.edu (Jeremy A Moskowitz) writes:
>>How does one get * and ? in 2.0??? (kinda reminiscient of the title, eh?)
>> 
>>E Pluribus //  Contacts: jeremym@brahms.udel.edu or jeremym@chopin.udel.edu or

>The program you run to set the flag for * wildcars is at
>ab20.larc.nasa.gov in the incoming/amiga dir., it's called
>starburst.lzh.


>   CloseLibrary(lib);

Starburst really didn't function like UNIX * (ie. ls *. and ls * )
so here is amazing beta software source of my new ultra-advanced-OOPS
star system 12....

starburstII which works on 1.3 and 2.0  wheres my green sticker?
(if you are lazy, three executables rm, ls, cp and source are on hubcap
in UTILS)

I reluctantly place this in the public domain! :)

----------------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void main(int, char *[]);
void replace_star(char *);
char newstring[256]="dir ";

void main (argc,argv)
int argc;
char *argv[];
{

 int x;
 
 /* called from workbench, exit */
 if (!argc) exit(0);
 
 for (x=1;x<argc;x++)
   replace_star(argv[x]);
   
 system(newstring);
}

/* replace all occurences of '*' with '#?'.  Yes, its cheap, but it works */
void replace_star(string)
char *string;
{
   char *evil = "#?";
   char *begin, *end;
   
   begin = end = string;

do {
     if (*end == '*')
         {
            *end = 0;
            strcat(newstring,begin);
            strcat(newstring,evil);
            begin=end+1;
            
         }
     end++;
      
}while (*end);

strcat(newstring,begin);
strcat(newstring," ");
}   
-- 
"It is recommended that each servicer have a pair of balls for maintaining
 optimum customer satisfaction, and that any customer missing his balls 
 should suspect local personnel of removing these necessary functional
 items. " -- abstract from computer accessory parts catalog (mouse balls)

WGLP09@SLACVM.SLAC.STANFORD.EDU (03/21/91)

That's correct. AmigaDOS 2.0 has the hidden bit to enable substitution of
#? for embedded * etc., but a single * by itself still means "console".
Compatibility seems to be the excuse...

      Willy.
----------
Willy Langeveld - Bitnet: WGLP09 @ SLACVM - BIX: langeveld

GHGAQZ4@cc1.kuleuven.ac.be (03/21/91)

But you can use ** instead of *. In this manner you will not get the
console.

  Jorrit Tyberghein

d9hh@dtek.chalmers.se (Henrik Harmsen) (03/22/91)

In <91079.135056WGLP09@SLACVM.SLAC.STANFORD.EDU> WGLP09@SLACVM.SLAC.STANFORD.EDU writes:

>That's correct. AmigaDOS 2.0 has the hidden bit to enable substitution of
>#? for embedded * etc., but a single * by itself still means "console".
>Compatibility seems to be the excuse...

>      Willy.
>----------
>Willy Langeveld - Bitnet: WGLP09 @ SLACVM - BIX: langeveld

Try '**' instead of '*' when you want it single without any characters to 
the left or to the right...  Yes this IS to avoid confusion with the console.

   Henrik


Henrik Harmsen - Internet: d9hh@dtek.chalmers.se

jms@vanth.UUCP (Jim Shaffer) (03/22/91)

In article <91080.105202GHGAQZ4@cc1.kuleuven.ac.be> GHGAQZ4@cc1.kuleuven.ac.be writes:
>But you can use ** instead of *. In this manner you will not get the
>console.

But in this manner you are not standard.  And ** is the same number of
keystrokes as #? (although obviously easier to type.)

--
*  From the disk of:  | jms@vanth.uucp		     | "You know I never knew
Jim Shaffer, Jr.      | amix.commodore.com!vanth!jms | that it could be so
37 Brook Street       | uunet!cbmvax!amix!vanth!jms  | strange..."
Montgomery, PA 17752  | 72750.2335@compuserve.com    |		     (R.E.M.)