[comp.sys.amiga] tilde in filename

bga@pnet51.orb.mn.org (Bruce Albrecht) (09/07/90)

What does the tilde (~) mean in an amigados 2.0 filename?  I couldn't file any
mention of it in the Using the System Software Manual.  It seems to have some
sort of wild-card properties (for example, dir ~ seems to be equivalent to dir
all, and rm #?~ would have deleted a lot more files if I hadn't done a break).
If it does have special meaning, where is it documented?

UUCP: {amdahl!bungia, uunet!rosevax, crash}!orbit!pnet51!bga
ARPA: crash!orbit!pnet51!bga@nosc.mil
INET: bga@pnet51.orb.mn.org

jjszucs@cbmvax.commodore.com (John J. Szucs) (09/08/90)

In article <3166@orbit.cts.com> bga@pnet51.orb.mn.org (Bruce Albrecht) writes:
>What does the tilde (~) mean in an amigados 2.0 filename?  I couldn't file any
>mention of it in the Using the System Software Manual.  It seems to have some
>sort of wild-card properties (for example, dir ~ seems to be equivalent to dir
>all, and rm #?~ would have deleted a lot more files if I hadn't done a break).
>If it does have special meaning, where is it documented?

The tilde (~) is a new wildcard character used as a logical NOT operator.
It should be placed before the wildcard expression you wish to NOT.

For example:

1.SYS:> list ~(#?.info)

will list all files not matching the pattern "#?.info" (all files that do not
end with .info).

I can't seem to find it in the documentation either (at least at a quick
glance), but I'll check with our Documentation department on it.

>UUCP: {amdahl!bungia, uunet!rosevax, crash}!orbit!pnet51!bga

================================================================================
|| John J. Szucs                    || The opinions expressed are my own and  ||
|| Systems Evaluation Group         || in no way represent the opinions or    ||
|| Product Assurance Department     || policies of Commodore Technology, Inc. ||
|| Commodore Technology, Inc.       || or any associated entity.              ||
================================================================================
...{rutgers|uunet|pyramid}!cbmvax!jjszucs
jjszucs@cbmvax.commodore.com

"Everything is deeply intertwingled." - Ted Nelson, Computer Lib/Dream Machines

mrush@csuchico.edu (Matt "C P." Rush) (09/09/90)

In article <14295@cbmvax.commodore.com> jjszucs@cbmvax.commodore.com (John J. Szucs) writes:
>
>The tilde (~) is a new wildcard character used as a logical NOT operator.
>It should be placed before the wildcard expression you wish to NOT.

	Yea!  FINALLY a NOT operator for AmigaDOS!

>For example:
>
>1.SYS:> list ~(#?.info)
>
>will list all files not matching the pattern "#?.info" (all files that do not
>end with .info).

	My question:  Does 2.0 feature some kind of NATIVE pattern matching
function that can be called by programs that wish to use Amiga wildcard
patterns?  Something like Manx's scdir() function would be really nice.  It
seems awfully wasteful to have to put pattern-matching code in EVERY program
that wants to use it (list, copy, delete, etc.).

	-- Matt

    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    %    "Progress is an up-hill battle       %  mrush@csuchico.edu      %
    %    against backwards compatibility."    %  mrush@cscihp.UUCP       %
    %              -- me                                                 %
    %                              Now:  mrush@cscihp.ecst.csuchico.edu  %
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
     This is a SCHOOL!  Do you think they even CARE about MY opinions?!

billsey@agora.uucp (Bill Seymour) (09/09/90)

In article <3166@orbit.cts.com> bga@pnet51.orb.mn.org (Bruce Albrecht) writes:
:What does the tilde (~) mean in an amigados 2.0 filename?  I couldn't file any
:mention of it in the Using the System Software Manual.  It seems to have some
:sort of wild-card properties (for example, dir ~ seems to be equivalent to dir
:all, and rm #?~ would have deleted a lot more files if I hadn't done a break).
:If it does have special meaning, where is it documented?

	I don't know where for sure it's documented, but the tilde is a
'not' symbol for wildcards in the 2.0 shell. Check out the parsing for
monitors stuff in the standard Startup-Sequence for 2.0. They execute
every program that *doesn't* end in .info and is in the Monitors directory.
I gave it a try, with things like copy and list, and they all seemed to
work as expected... Now all we need is an AND symbol and something like
[a-n,q].

:UUCP: {amdahl!bungia, uunet!rosevax, crash}!orbit!pnet51!bga
:ARPA: crash!orbit!pnet51!bga@nosc.mil
:INET: bga@pnet51.orb.mn.org


-- 
     -Bill Seymour             ...tektronix!reed!percival!agora!billsey
=============================================================================
Bejed, Inc.       NES, Inc.        Northwest Amiga Group    At Home Sometimes
(503) 281-8153    (503) 246-9311   (503) 656-7393 BBS       (503) 640-0842

mt87692@lehtori.tut.fi (Tsokkinen Mikko) (09/10/90)

In article <3166@orbit.cts.com> bga@pnet51.orb.mn.org (Bruce Albrecht) writes:

> What does the tilde (~) mean in an amigados 2.0 filename?  I couldn't file any
> mention of it in the Using the System Software Manual.  It seems to have some
> sort of wild-card properties (for example, dir ~ seems to be equivalent to dir
> all, and rm #?~ would have deleted a lot more files if I hadn't done a break).
> If it does have special meaning, where is it documented?

~ is NOT operator and it's documented at least in ARP1.3 manuals.

 MIT

--
Mikko "Assembler rules OK!" Tsokkinen
Internet mt87692@tut.fi : UUCP tut!mt87692 : Bitnet mt87692@fintut

bcphyagi@Twg-S5.uucp (Stephen Walton) (09/12/90)

In article <3166@orbit.cts.com> bga@pnet51.orb.mn.org (Bruce Albrecht) writes:
>What does the tilde (~) mean in an amigados 2.0 filename?

As many others have pointed out, this is a NOT operator.  However, Bruce
asked partly because typing "delete #?~" now deletes ALL files, rather than
just Emacs-type backup files (which end with ~).  The escape character
is an apostrophe (single-quote), so "delete #?'~" will delete all Emacs
backup files.

--
Stephen R. Walton, Dept. of Physics and Astronomy, Cal State Northridge
I am srw@csun.edu no matter WHAT the stupid From: line says!

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

In article <1990Sep11.210431.9184@csun.edu> bcphyagi@Twg-S5.uucp (Stephen Walton) writes:
>In article <3166@orbit.cts.com> bga@pnet51.orb.mn.org (Bruce Albrecht) writes:
>>What does the tilde (~) mean in an amigados 2.0 filename?
>
>As many others have pointed out, this is a NOT operator.  However, Bruce
>asked partly because typing "delete #?~" now deletes ALL files, rather than
>just Emacs-type backup files (which end with ~).  The escape character
>is an apostrophe (single-quote), so "delete #?'~" will delete all Emacs
>backup files.
>

Also, beside the new not operator, we have character classes,
using the [],
so things like this:

list [a-c]~(#?.o) are now possible.

		andy

>Stephen R. Walton, Dept. of Physics and Astronomy, Cal State Northridge


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

"Usenet: A method for college students to demonstrate job qualifications
 and suitability to potential employers."

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