[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two easy ones
From: |
Martin Grabmueller |
Subject: |
Re: two easy ones |
Date: |
Mon, 05 Mar 2001 08:17:53 +0100 |
> From: address@hidden
> Date: Sun, 4 Mar 2001 8:45:37 +0100
>
> hey guys,
>
> first, can I return the date using guile? (the system "date"
> command doesn't count :-)
guile> (current-time)
983776441
guile> (localtime (current-time))
#(6 14 8 5 2 101 1 63 0 -3600 "CET")
guile> (strftime "%Y-%m-%d:%H:%M:%S %Z" (localtime (current-time)))
"2001-03-05:08:14:34 CET"
> and, how, from guile, can I call a script from another language
> and then use the result? (I'm stuck on the "using the result"
> part...)
guile> (use-modules (ice-9 popen))
guile> (define p (open-input-pipe "ls -l"))
guile> (read-line p)
"total 1995"
guile> (read-line p)
"-rw-r--r-- 1 mgrabmue mgrabmue 3989 Dec 23 18:27 ANON-CVS"
guile> (read-line p)
"-rw-r--r-- 1 mgrabmue mgrabmue 2985 Mar 14 2000 AUTHORS"
HTH,
'martin
- two easy ones, balayo, 2001/03/04
- Re: two easy ones,
Martin Grabmueller <=