|
From: | Matthew Woehlke |
Subject: | Re: include dos2unix/unix2dos in coreutils ? |
Date: | Mon, 13 Nov 2006 12:07:37 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.0 |
Alfred M. Szmidt wrote:
Huh, never new about '--in-place' (sure wish I did!). But what is 'recode'? I don't seem to have a "recode", nor do I see anything about "recode" in sed. Did you mean iconv? (Maybe the real answer is 'coreutils already has d2u and friends, they just aren't obvious'?)I think that a program to make it easy to _other_ programs to keep the date unmodified would be useful, same for a program that would make it easy to do in-place hacks.
Agreed... although I think it might be best if the former were an option of the latter.
Not sure how such a thing would look like though...
"inplace --keepdate <file> -- <prog> <args>"i.e. it would have to take the program to run (with args) as args; it would then read '<file>', pipe it to '<prog> <args>' (which it would fork() exec()) as stdin, and take <prog>'s stdout and write that back to <file> (and would have to either use a temp file or a Really Big Buffer since of course you can't safely overlay while reading).
...and I suppose it would work like 'xargs -n1' if given more than one file. -- Matthew $ kill bill kill: can't find process "bill"
[Prev in Thread] | Current Thread | [Next in Thread] |