HP3000-L Archives

August 2003, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Paul H. Christidis" <[log in to unmask]>
Reply To:
Date:
Wed, 20 Aug 2003 13:32:47 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Bruce Collins <[log in to unmask]> wrote:

> Subject Re: [HP3000-L] Last Access Date
>
> You could probably write a posix script that would do something like:
>
> touch -r search_file temp_file
> grep search_pattern search_file
> touch -r temp_file search_file
>
> The first touch would create temp_file with the same access and
modification
> times as the file that you want to scan, and then after the grep the
second
> touch would reset the times of the file to what they were before.
>
<<snip>>

Once every year or so, I get this idea that I can incorporate
'touch.hpbin.sys' into my 'FileScan' program (A CM 'string searching'
program) to prevent changing the file's access date. And every time, so
far, I have been thwarted by the idiosyncrasies of 'touch.hpbin.sys'.

When the above suggestion was posted in the list, it motivated me to try
and use it.  It seemed simpler than the approach I had tried two years ago
of extracting the file's access date, before closing the file, creating
another CI process and 'feeding' it a series of 'run touch.hpbin...'
statements with the old access date, etc...

After determining that 'touch' behaves differently under CI than it does
under 'posix' when trying to use it as indicated on the above script, I ran
up against the same 'old' problem. It seems that 'touch' insists on trying
to perform some type of 'terminal I/O', even though its $stdlist & $stdin
have been re-directed, and thus the secondary CI process ends up hanging.
I wish that 'touch' had some switch setting that would instruct it not to
perform terminal I/O, it would certainly solve this problem and would also
make it more 'usable' in a batch environment.

I guess I'll put off using 'touch' for another year.

Regards
Paul Christidis

P.S.  Does anyone have any code (CM preferably) that I could incorporate
into my utility that I would let me retain a file's access date?


* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2