Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #913 > unrolled thread

Wildcards in Obey files

Started by"Richard Torrens (News)" <News+15271@Torrens.org.uk>
First post2011-10-24 08:29 +0100
Last post2011-11-01 23:32 +0000
Articles 11 — 8 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Wildcards in Obey files "Richard Torrens (News)" <News+15271@Torrens.org.uk> - 2011-10-24 08:29 +0100
    Re: Wildcards in Obey files Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2011-10-24 11:33 +0100
      Re: Wildcards in Obey files "Richard Torrens (News)" <News+15278@Torrens.org.uk> - 2011-10-31 16:14 +0000
    Re: Wildcards in Obey files Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-25 07:20 +0200
      Re: Wildcards in Obey files "Richard Torrens (News)" <News+15278@Torrens.org.uk> - 2011-10-31 16:17 +0000
        Re: Wildcards in Obey files Ian Hamilton <Ian.Hamilton@AAUG.net> - 2011-10-31 09:00 +0000
        Re: Wildcards in Obey files Martin Wuerthner <spamtrap@mw-software.com> - 2011-10-31 15:04 +0100
        Re: Wildcards in Obey files Ron <beeb@woosh.co.nz> - 2011-11-05 15:17 +1300
          Re: Wildcards in Obey files druck <news@druck.org.uk> - 2011-11-05 16:06 +0000
            Re: Wildcards in Obey files Ron <beeb@woosh.co.nz> - 2011-11-06 16:27 +1300
    Re: Wildcards in Obey files Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2011-11-01 23:32 +0000

#913 — Wildcards in Obey files

From"Richard Torrens (News)" <News+15271@Torrens.org.uk>
Date2011-10-24 08:29 +0100
SubjectWildcards in Obey files
Message-ID<5227152c09news*@Torrens.org.uk>
I have an obey file which renames a bunch of files in a directory, then
should delete the directory.

The directory is named with a date, e.g.  logs-2011-10-24

These are www logs downloaded from a Linux server so have a consistent
name format.

The line

Copy "logs-<Transient$TodayLeaf>"
"<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D

always gives an error "Unknown operand" yet the same line dragged into a
task window works.

So is there a way of deleting a wildcarded directory from an obey file? 


R.O 4.39 (28 Apr 2004) [Kernel 6.80]

-- 
------------------------------------------------------------------
Richard Torrens. News email address is valid - for a limited time only.
http://www.Torrens.org.uk for genealogy, natural history, wild food, walks, cats
and more!

[toc] | [next] | [standalone]


#916

FromJeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk>
Date2011-10-24 11:33 +0100
Message-ID<mpro.ltkfzt001yyid02gk@wingsandbeaks.org.uk.invalid>
In reply to#913
Richard Torrens (News) <News+15271@Torrens.org.uk> wrote:

> The line
> 
> Copy "logs-<Transient$TodayLeaf>"
> "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
> 
> always gives an error "Unknown operand" yet the same line dragged into a
> task window works.
> 
> So is there a way of deleting a wildcarded directory from an obey file?

As there's no wildcard in the line above, why are you talking about it?

You might replace

  Copy ....

with 

  Do Copy ....

The 'do' resolves the system symbols so that the line passed to Copy has no
symbols in it; this sometimes fixes this sort of problem.


-- 
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to newsreplyaaa@wingsandbeaks.org.uk replacing "aaa" by "284".  

[toc] | [prev] | [next] | [standalone]


#961

From"Richard Torrens (News)" <News+15278@Torrens.org.uk>
Date2011-10-31 16:14 +0000
Message-ID<522ae01abcnews*@Torrens.org.uk>
In reply to#916
In article <mpro.ltkfzt001yyid02gk@wingsandbeaks.org.uk.invalid>,
   Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk>
wrote:
> Richard Torrens (News) <News+15271@Torrens.org.uk> wrote:

> > The line
> > 
> > Copy "logs-<Transient$TodayLeaf>"
> > "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
> > 
> > always gives an error "Unknown operand" yet the same line dragged into
> > a task window works.
> > 
> > So is there a way of deleting a wildcarded directory from an obey file?

> As there's no wildcard in the line above, why are you talking about it?

> You might replace

>   Copy ....

> with 

>   Do Copy ....

> The 'do' resolves the system symbols so that the line passed to Copy has
> no symbols in it; this sometimes fixes this sort of problem.

No - that doesn't do the trick!

Sory for the wrong Subject: !

-- 
------------------------------------------------------------------
Richard Torrens. News email address is valid - for a limited time only.
http://www.Torrens.org.uk for genealogy, natural history, wild food, walks, cats
and more!

[toc] | [prev] | [next] | [standalone]


#922

FromRick Murray <heyrickmail-usenet@yahoo.co.uk>
Date2011-10-25 07:20 +0200
Message-ID<4ea6472e$0$30778$ba4acef3@reader.news.orange.fr>
In reply to#913
On 24/10/2011 09:29, Richard Torrens (News) wrote:

> Copy "logs-<Transient$TodayLeaf>"
> "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
[...]
> So is there a way of deleting a wildcarded directory from an obey file?

I see no * or # in the line quoted. Wildcards != system variables. ;-)

What I would wonder is if the quotes are necessary, and if they change 
behaviour (i.e. <Transient$TodayLeaf> is passed literally instead of 
being expanded due to it being in quotes).


Best wishes,

Rick.

[toc] | [prev] | [next] | [standalone]


#962

From"Richard Torrens (News)" <News+15278@Torrens.org.uk>
Date2011-10-31 16:17 +0000
Message-ID<522ae0640bnews*@Torrens.org.uk>
In reply to#922
In article <4ea6472e$0$30778$ba4acef3@reader.news.orange.fr>,
   Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:
> On 24/10/2011 09:29, Richard Torrens (News) wrote:

> > Copy "logs-<Transient$TodayLeaf>"
> > "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
> [...]
> > So is there a way of deleting a wildcarded directory from an obey file?

> I see no * or # in the line quoted. Wildcards != system variables. ;-)

> What I would wonder is if the quotes are necessary, and if they change 
> behaviour (i.e. <Transient$TodayLeaf> is passed literally instead of 
> being expanded due to it being in quotes).

Sorry for using "wildcard" in subject.

I have tried all variants on this that I can think of!

It seems a line passed from a task windiw is simply treated differently to
the same line on an Obey file.

-- 
------------------------------------------------------------------
Richard Torrens. News email address is valid - for a limited time only.
http://www.Torrens.org.uk for genealogy, natural history, wild food, walks, cats
and more!

[toc] | [prev] | [next] | [standalone]


#963

FromIan Hamilton <Ian.Hamilton@AAUG.net>
Date2011-10-31 09:00 +0000
Message-ID<522ab85b7cIan.Hamilton@AAUG.Net>
In reply to#962
In article <522ae0640bnews*@Torrens.org.uk>,
   Richard Torrens (News) <News+15278@Torrens.org.uk> wrote:
> In article <4ea6472e$0$30778$ba4acef3@reader.news.orange.fr>,
>    Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:
> > On 24/10/2011 09:29, Richard Torrens (News) wrote:

> > > Copy "logs-<Transient$TodayLeaf>"
> > > "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
> > [...]
> > > So is there a way of deleting a wildcarded directory from an obey
> > > file?

> > I see no * or # in the line quoted. Wildcards != system variables. ;-)

> > What I would wonder is if the quotes are necessary, and if they
> > change behaviour (i.e. <Transient$TodayLeaf> is passed literally
> > instead of being expanded due to it being in quotes).

> Sorry for using "wildcard" in subject.

> I have tried all variants on this that I can think of!

> It seems a line passed from a task window is simply treated differently
> to the same line on an Obey file.

Not sure why they should be any different. You could set the filetype to
'TaskObey'.

Ian

-- 
Ian Hamilton (Iyonix RO5)  http://www.hamiltoni.pwp.blueyonder.co.uk/

[toc] | [prev] | [next] | [standalone]


#967

FromMartin Wuerthner <spamtrap@mw-software.com>
Date2011-10-31 15:04 +0100
Message-ID<1e30d42a52.martin@bach.planiverse.com>
In reply to#962
In message <522ae0640bnews*@Torrens.org.uk>
          "Richard Torrens (News)" <News+15278@Torrens.org.uk> wrote:

> In article <4ea6472e$0$30778$ba4acef3@reader.news.orange.fr>,
>    Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:
>> On 24/10/2011 09:29, Richard Torrens (News) wrote:

>>> Copy "logs-<Transient$TodayLeaf>"
>>> "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D

> [...]
> Sorry for using "wildcard" in subject.

> I have tried all variants on this that I can think of!

> It seems a line passed from a task windiw is simply treated differently to
> the same line on an Obey file.

I do not think so. At a guess, you have not used exactly the same 
commands. In any case, the above command seems to depend on the 
current directory, so it may well do different things depending on 
when it is executed.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

[toc] | [prev] | [next] | [standalone]


#999

FromRon <beeb@woosh.co.nz>
Date2011-11-05 15:17 +1300
Message-ID<79a0262d52.beeb@ron1954.woosh.co.nz>
In reply to#962
In message <522ae0640bnews*@Torrens.org.uk>
          "Richard Torrens (News)" <News+15278@Torrens.org.uk> wrote:

> In article <4ea6472e$0$30778$ba4acef3@reader.news.orange.fr>,
>    Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:
> > On 24/10/2011 09:29, Richard Torrens (News) wrote:
> 
> > > Copy "logs-<Transient$TodayLeaf>"
> > > "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
> > [...]
> > > So is there a way of deleting a wildcarded directory from an obey file?
> 
> > I see no * or # in the line quoted. Wildcards != system variables. ;-)
> 
> > What I would wonder is if the quotes are necessary, and if they change 
> > behaviour (i.e. <Transient$TodayLeaf> is passed literally instead of 
> > being expanded due to it being in quotes).
> 
> Sorry for using "wildcard" in subject.
> 
> I have tried all variants on this that I can think of!
> 
> It seems a line passed from a task windiw is simply treated differently to
> the same line on an Obey file.
> 

I know this seems back to front from what you describe,
but I think *copy can misbehave from a taskwindow?
An obey file should be issuing the command to the CLI,
but I think Obey is operating in a backgrounded Taskwindow.
A TaskObey 'wont open a Taskwindow unless needed to'
Perhaps you could try retyping the Obey file to TaskObey.

A confusing command name Taskwindow, it doesn't necessarily
mean 'display in window' unless there is std output or
you specify -display.
But it has functioning that Wimptask doesn't have also.

Ron M.

[toc] | [prev] | [next] | [standalone]


#1001

Fromdruck <news@druck.org.uk>
Date2011-11-05 16:06 +0000
Message-ID<j93mt8$7sm$1@dont-email.me>
In reply to#999
On 05/11/2011 02:17, Ron wrote:
> I know this seems back to front from what you describe,
> but I think *copy can misbehave from a taskwindow?

It wont misbehave, but multitasking of other applications may be 
degraded when using slower filing systems, as each block that is copied 
can't be interrupted.

> An obey file should be issuing the command to the CLI,
> but I think Obey is operating in a backgrounded Taskwindow.

If an obey file is run from the taskwindow, the command is run in a 
taskwindow.

> A TaskObey 'wont open a Taskwindow unless needed to'
> Perhaps you could try retyping the Obey file to TaskObey.

But it is still being run by the taskwindow module i.e. it will be 
pre-empted when possible to allow other desktop applications to run. A 
window will only appear when output is generated, but the command run in 
the same way regardless.

A useful option is the TaskExec type, which runs the command 
multi-tasking but opens a taskwindow straight away to display the 
commands themselves.

> A confusing command name Taskwindow, it doesn't necessarily
> mean 'display in window' unless there is std output or
> you specify -display.
> But it has functioning that Wimptask doesn't have also.

As explained above.

---druck

[toc] | [prev] | [next] | [standalone]


#1002

FromRon <beeb@woosh.co.nz>
Date2011-11-06 16:27 +1300
Message-ID<33e5b02d52.beeb@ron1954.woosh.co.nz>
In reply to#1001
In message <j93mt8$7sm$1@dont-email.me>
          druck <news@druck.org.uk> wrote:

> On 05/11/2011 02:17, Ron wrote:
> > I know this seems back to front from what you describe,
> > but I think *copy can misbehave from a taskwindow?
> 
> It wont misbehave, but multitasking of other applications may be 
> degraded when using slower filing systems, as each block that is copied 
> can't be interrupted.
> 
> > An obey file should be issuing the command to the CLI,
> > but I think Obey is operating in a backgrounded Taskwindow.
> 
> If an obey file is run from the taskwindow, the command is run in a 
> taskwindow.
> 
> > A TaskObey 'wont open a Taskwindow unless needed to'
> > Perhaps you could try retyping the Obey file to TaskObey.
> 
> But it is still being run by the taskwindow module i.e. it will be 
> pre-empted when possible to allow other desktop applications to run. A 
> window will only appear when output is generated, but the command run in 
> the same way regardless.
> 
> A useful option is the TaskExec type, which runs the command 
> multi-tasking but opens a taskwindow straight away to display the 
> commands themselves.
> 
Handy to know. I guess the filetypes are only going to effect the
excution of the lines if the file is run or double clicked.

'The *Obey command excutes a file of *commands. ..... With the -v
option, each line is displayed before execution.'

This sounds like your TaskExec description.
There should be no problem using     Obey -v <file>
instead of     Run <Obey_or_TaskExec_typedfile>

Obey -v <file> <SourceFile> <DestFile>
with <file> having the line     Copy %0 %1 ~C R D

Thanks, Ron M.
  


 

[toc] | [prev] | [next] | [standalone]


#977

FromJeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk>
Date2011-11-01 23:32 +0000
Message-ID<mpro.lu09eo006dkrf02gg@wingsandbeaks.org.uk.invalid>
In reply to#913
Richard Torrens (News) <News+15271@Torrens.org.uk> wrote:

> The line
> 
> Copy "logs-<Transient$TodayLeaf>"
> "<Transient$TodayDir>.Logs-<Transient$TodayLeaf>" R D
> 
> always gives an error "Unknown operand" yet the same line dragged into a
> task window works.

If you're running !Reporter (and if not, why not?), what does it show for
the working and non-working variants of this command?

-- 
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to newsreplyaaa@wingsandbeaks.org.uk replacing "aaa" by "284".  

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web