On 12/05/2012 01:41 AM, Bernhard Voelker wrote:
On 12/05/2012 02:34 AM, Pádraig Brady wrote:
On 12/05/2012 01:25 AM, Raphael S Carvalho wrote:
I was thinking about writing such a program using C language,
[...]


The idea here is that swapping files would be just a thin
wrapper around the mv or cp or ln utilities which
already do the heavy lifting in C for copying data
around (often using complicated techniques), or
in fact just renaming as appropriate.

Well, maybe a C program execing mv/cp/ln would be easier
to maintain than a shell script regarding portability ...
;-)

Sure.

But shell would be a good prototype for this at least.
Also having scripts like this portable to the vast
majority of shells would be a good source of robust
shell examples that use coreutils to the fullest.
They would also ensure to some extent that we were
providing appropriate interfaces from the C utilities,
to be robustly and efficiently used by shell scripts.

cheers,
Pádraig.

Reply via email to