[Coco] [coco] Shell Scripts
Gene Heskett
gene.heskett at verizon.net
Sun Dec 16 22:39:12 EST 2007
On Sunday 16 December 2007, George Ramsower wrote:
>I've been trying to get a few OS9 commands to run in a shell script and have
>found a few problems....
>
>One problem I'm having is trying to delete a directory.. I created a
>directory just for this example.
>
>Here's the result of a simple, one line shell script which reads as
>follows..
>
>OS9[T2]:list cmds/testdelete
>deldir /h0/test
is there a cr on the end of that line?
>
>Here's the result..
>
>OS9[T2]:testdelete
>
>Deleting directory file.
>List directory, delete directory, or quit ? (l/d/q) ERROR #211
211 is "End of File"
>OS9[T2]:
>
>So, I tried these combinations :
>
>deldir d /h0/test
>deldir /h0/test d
>
>Nothing worked. They all three resulted in an ERROR #211
>
>>From a command line, it works as intended, of course. But I did have to
> choose the D option after starting it.
I suspect you may have to do this with two files, one containing the 'd', and
lets say you call it "dconfirm" and its located in /h0's root.
So then you might do:
OS9[T2]:deldir /h0/test <./dconfirm
which would redirect that d into the deldir command.
Does that work? Somewhere I saw a similar setup where the redirected file
contained:
y
y
y
y
y
y
for every place where the parent script it was being sourced to needed a y/n
answer.
I think one could do this in the dconfirm file too:
l
d
etc, and it should list it, then delete it.
>Is there a way to do this from a shell script? ((( Shell+ v2.1)))
>
>George
>
>
>--
>Coco mailing list
>Coco at maltedmedia.com
>http://five.pairlist.net/mailman/listinfo/coco
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
C++ is the best example of second-system effect since OS/360.
More information about the Coco
mailing list