[comp.sys.amiga] Replacement ECHO / CLI feature

rouaix@inria.UUCP (05/19/87)

1) There is in AmigaDos Manual the description for some "quoting" feature
in CLI command parsing (could be p 1-3).
To introduce a " (double-quote) in a filename, you shall use * (star) as 
a quoting character (somewhat like back-slash under Unix).
Consequently, you must use * to quote itself.

2) Echo command: it is not specified whether the argument is to be considered
as a string or not.
Practice shows that the argument for Echo is parsed as a filename (shall
we say it is a bug ? :-) ), so that  << echo "*" >> won't work.

I make this remark for two reasons:
	1) there has been some weeks ago a posting containing some 
alternative for AmigaDOS commands, one of them being echo.
this version DOES NOT RESPECT the "/* feature.
	2) i'm writing currently a new kind (i think) of execute scripts
using EDIT (no kidding !) and i use Echo to create command files for EDIT.
Some of these scripts will be posted here, and i want to prepare you to
the fact that these scripts will not work when using the "short echo".
As a matter of fact, the CD command in the same posting may also fail
when used in execute scripts, where the original one would work.

Last minute add: there is now another ECHO replacement, and I suspect it
not to follow the "/* feature .

andy@cbmvax.UUCP (05/20/87)

In article <462@inria.UUCP> rouaix@inria.UUCP (Francois Rouaix) writes:
>
>1) There is in AmigaDos Manual the description for some "quoting" feature
>in CLI command parsing (could be p 1-3).
>To introduce a " (double-quote) in a filename, you shall use * (star) as 
>a quoting character (somewhat like back-slash under Unix).
>Consequently, you must use * to quote itself.
>
>2) Echo command: it is not specified whether the argument is to be considered
>as a string or not.
>Practice shows that the argument for Echo is parsed as a filename (shall
>we say it is a bug ? :-) ), so that  << echo "*" >> won't work.
Actually, to echo a * either use
echo *
  or
echo "**"
to echo the " (which is what echo figured you were trying to do) you need
a closing quote, ie
echo "*""

Additional fun stuff with * is
*N (newline)
*E (escape)

>I make this remark for two reasons:
>	1) there has been some weeks ago a posting containing some 
>alternative for AmigaDOS commands, one of them being echo.
>this version DOES NOT RESPECT the "/* feature.
>	2) i'm writing currently a new kind (i think) of execute scripts
>using EDIT (no kidding !) and i use Echo to create command files for EDIT.
I play with these too.  Edit makes an OK stream editor, as it turns
out, as long as you don't mind occasionally writing out a temp file
to RAMdisk, and reading it back in.  My original touch shell script
used Edit, before I decided to get tricky with argument passing.
>Some of these scripts will be posted here, and i want to prepare you to
>the fact that these scripts will not work when using the "short echo".
This is an excellent point, dear to the hearts of shell script writers...
We assume the original commands (as a L.C.D.) with the original names.
So, keep those old commands around...they may be handy someday!
(I always keep an *untouched* Workbench disk around for just such occasions)
			andy

-- 
andy finkel		{ihnp4|seismo|allegra}!cbmvax!andy 
Commodore/Amiga		

"An end is always a new beginning." - Captain Cloud

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