Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
124 user(s) are online (96 user(s) are browsing Forums)

Members: 0
Guests: 124

more...

Headlines

 
  Register To Post  

Need help not to do something (ADOS4 List)
Quite a regular
Quite a regular


See User information
The only place on the internet* I was able to find a way to NOT list certain files was here.
http://www.amigau.com/aig/tips.html

list ~(info)

and, it doesn't work!

When it's that hard to use something, that's why I'm such a fan of AMOS Pro.

(I couldn't even really find an AmigaDOS users guide.)

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Need help not to do something (ADOS4 List)
Just popping in
Just popping in


See User information
@Atheist

That example on the page is incorrect. I don't see anything in the documentation drawers about pattern matching, but this has been mostly the same since OS 1.x

Maybe this online guide will help you.

http://www.titan.co.nz/Amigaak/AA020844e00.htm#PATM


Scott Woodall

Go to top
Re: Need help not to do something (ADOS4 List)
Quite a regular
Quite a regular


See User information
Hi swoodall,

Thank you for finding that.

~.info

lists only files ending with
.info

But so does
#?.info
So "~" and "#?" are the same now?

Okay, I tried (from that url):
list <~.info>

and nothing is listed out at all.

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Need help not to do something (ADOS4 List)
Amigans Defender
Amigans Defender


See User information
@Atheist

~ is a "not" for only the next character/expression. To not show .info files, you need ~(#?.info)


edit: oh, and there are bugs in the OS4 pattern matching routines, for example #(AB|BA) doesn't work as it should.
~.info probably should do the same as ?info but missing out the file called .info

Go to top
Re: Need help not to do something (ADOS4 List)
Quite a regular
Quite a regular


See User information
Hi Chris,

Ok, thanks very much:
list ~(.info)

works

Ooops. I made a mistake, the below
list <~.info>

Gives this error message
list: unable to open redirection file.

But I thought THIS was the proper way of typing it:
list ~<.info>
from the URL.

It would be helpful if actual command examples are given. But, I didn't scroll down that page, I saw that it has quite a few actual examples. My bad.

I recognize that ADOS is incredibly powerful. (Knew for a loooooong time it was very powerful.)

Can anyone comment, ms-dos got up to what 7.x? Is ADOS as powerful, or moreso than ms's?

Support Amiga Fantasy cases!!!
How to program: 1. Start with lots and lots of 0's. 10. Add 1's, liberally.
"Details for OS 5 will be made public in the fourth quarter of 2007, ..." - Bill McEwen
Whoah!!! He spoke, a bit late.
Go to top
Re: Need help not to do something (ADOS4 List)
Just popping in
Just popping in


See User information
@Atheist

The <p> is meant as a placeholder for a character OR an expression. The angle brackets are not part of the pattern matching! Take a look at the examples.

<p> could be A or B or ? or (#?.info) or (A|B|C) and so on ...

As Chris wrote ~ will only negate the next expression which could be a single character OR an expression which must be enclosed in parentheses.

~(.info) will match anything except ".info"

#?.info will match anything ending with ".info"

If you want the opposite you negate the expression.

1. Enclose the expression with parantheses: (#?.info)
2. Negate it: ~(#?.info)

Go to top
Re: Need help not to do something (ADOS4 List)
Quite a regular
Quite a regular


See User information
@Atheist

From Mastering Amidos3:-
Quote:
~ reverse action of the next wildcard or pattern group. (NOT wildcard). Parenthesis must enclose patterns when NOT is in effect.

# Match any number of the following character.

? Match any character.

#? Match everything up to the next character.


I hope that helps.

Peter Swallow

Eyetech A1XE-G3 800Mhz OS4.1
Towered A1200 OS3.9
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project