Hi List,
related to the nice idea of publishing the Rosettacode examples (which
would actually be nicer _with_ the task descriptions included) I have a
few (probably rather newbie) technical questions about manipulating the
file-system and processing text in PicoLisp:
1. How to make, concat
the Rosettacode examples (which
would actually be nicer _with_ the task descriptions included) I have a
few (probably rather newbie) technical questions about manipulating the
file-system and processing text in PicoLisp:
1. How to make, concat, and kill files (and directories) on Linux with
PicoLisp
Alexander Burger a...@software-lab.de writes:
Hi Alex,
thanks a lot, thats what I needed to know, now I have to give it a try.
3. Is it possible to use 'prog' or 'let' with 'apply', i.e. apply a
whole sequence of functions instead of only one to the 'lst argument?
I'm not sure what you
Henrik Sarvell hsarv...@gmail.com
writes:
Hi Henrik,
Below I've pasted links to descriptions of functions that might or
might not be what you want based on a quick glance on your questions:
1.) http://software-lab.de/doc/refC.html#call
2.) http://software-lab.de/doc/refM.html#match
Alexander Burger a...@software-lab.de writes:
For making files where you will usually use 'out', and write directly to
the file.
To concat two files, you could do:
(out c (in a (echo)) (in b (echo)))
Erasing a file is not implemented as a PicoLisp function. You can simply
call 'rm'
AFAIK out doesn't do auto dir creation or any dir creation for that matter.
Looks good but the cd thing should not be necessary, just use the absolute
path in the last call.
Note that you can use info to check stuff, could possibly be used in a
function that checks a certain path from top to
Henrik Sarvell hsarv...@gmail.com
writes:
AFAIK out doesn't do auto dir creation or any dir creation for that
matter.
ok
Note that you can use info to check stuff, could possibly be used in a
function that checks a certain path from top to bottom and creates any
missing dirs on the way. Ie
Hi Thorsten,
Is there a way to make 'out' write directories too?
No, 'out' just creates or opens a file for writing.
Or do I have to use something like
,--
| (call 'mkdir /new/dir/)
`--
Yes. But this works only if /new/ already exists. If