Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
26 user(s) are online (22 user(s) are browsing Forums)

Members: 0
Guests: 26

more...

Support us!

Headlines

 
  Register To Post  

List and quotes in LFORMAT
Quite a regular
Quite a regular


See User information
Hi,

There seems to be a bug somewhere because no matter what I try I cannot seem to be able to put much needed quotes in the output from LFORMAT.

This is what I have basically:
list FILES ALL LFORMAT="command %s%s params" >file

Now, the filepaths generated by %s%s deperately need quotes because they have spaces and other crap in them, especially spaces.

However, none of this work:
LFORMAT="command "%s%s" params"
LFORMAT="command ""%s%s"" params"
LFORMAT="command "%s%s" params"
LFORMAT='command "%s%s" params'
LFORMAT='command %"%s%s%" params'
LFORMAT=command "%s%s" params
LFORMAT="command %q%s%s%q params"

And looking in the docs for List there doesn't seem to be any %param (like %q or \q or ")for inserting quotes which is quite a mistake!

I think this needs to be addressed for update3!

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top
Re: List and quotes in LFORMAT
Just popping in
Just popping in


See User information
simply escape the quotes with a wildcard like this:

LFORMAT="command *"%s%s*" params"

A1-XE-G4 7455/933 - 2GB RAM - OS4.1 beta - Radeon 9200-256
Audigy2 - ESI Julia - Solo1 - X10 (cm11a) - WiFi (WAP11) - 2x80GB HDD
Go to top
Re: List and quotes in LFORMAT
Quite a regular
Quite a regular


See User information
A wildcard?? I would never have thought of that! I guess that's also documented somewhere.

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top
Re: List and quotes in LFORMAT
Just popping in
Just popping in


See User information
Actually, it's not a wildcard on AmigaOS (here, "*" is "#?" as we all know) but actually indeed an escape character (instead of backslash "") for exactly this purpose.

It is documented in the AmigaDOS booklet or at least in the AmigaOS3.5-Book (or however, it was called by Haage & Partner).

regards,
nexus


Go to top
Re: List and quotes in LFORMAT
Just can't stay away
Just can't stay away


See User information
@nexus

Asterisk ('*' character) can be used as a wildcard in AmigaDOS too if you enable this in DOS prefs.

Go to top
Re: List and quotes in LFORMAT
Just can't stay away
Just can't stay away


See User information
As nexus says, * is not really a wildcard. At some point it was allowed as an equivalent for the #? wildcard because it is a wildcard on other systems. It is allowed as an option for OS4. See SYS:Prefs/DOS "Allow asterisk in pattern matching". At some point everyone realized that it was confusing to use * to represent the current console output, an escape character and a wildcard. That's why it is recomended that:
CONSOLE: be used to represent current window output instead of *
The standard Amiga wildcard #? be used instead of *

Go to top
Re: List and quotes in LFORMAT
Home away from home
Home away from home


See User information
@AlexC

Awesome hint, thanks a lot, i was going mad myself looking up a solution for this

Cheers

Go to top
Re: List and quotes in LFORMAT
Just popping in
Just popping in


See User information
@Raziel

Actually,*Amigans* should know!

.. but I also tend to forget it myself too often because I'm used to unix like systems, too. However, as long as the community is as helpful as here at amigans.net or eventually, the brain turns on its lights again, it's doesn't matter that much.

regards,
nexus

Go to top

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project