Thread View: news.software.readers
2 messages
2 total messages
Started by John R MacMillan
Sat, 04 Oct 1997 00:00
slrn macros: running other commands
Author: John R MacMillan
Date: Sat, 04 Oct 1997 00:00
Date: Sat, 04 Oct 1997 00:00
10 lines
934 bytes
934 bytes
I'm trying to write an slrn macro that will, with a single keystroke, add a score file entry for the current subject across all groups that expires a week from today. If I have the date string, I pre-load the input and call "create_score". I can get the date string via GNU date. But how can I run GNU date and capture the output? -- To reply by mail, please remove "mail." from my address
Re: slrn macros: running other commands
Author: John E. Davis
Date: Sat, 04 Oct 1997 00:00
Date: Sat, 04 Oct 1997 00:00
22 lines
1332 bytes
1332 bytes
On 4 Oct 1997 08:34:54 GMT, John R MacMillan <john@mail.interlog.com> wrote: >expires a week from today. If I have the date string, I pre-load the >input and call "create_score". I can get the date string via GNU >date. But how can I run GNU date and capture the output? The current version of slang has no support for reading from a pipe, so you would have to use the `system' function to call `date' and send its output to a file. Then read the file using the appropriate slang intrinsics, e.g., fopen, fgets, and fclose. An alternative is to use the built-in `time' intrinsic function. It returns a string of the form: "Sat Oct 4 11:50:55 1997" Then you can extract the fields with other slang intrinsics. --John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads