-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Brock Noland on 4/5/2008 6:47 PM: | Greetings, | | I find myself for whatever reason, wanting to prepend a file (or | stdin) to a file. Most often when dealing XML that does not have a top | level tag. | | This can be done safely in the shell but requires a lot of work. | (Maybe there is already a better way?)
What shell commands have you been trying? I find the following to be relatively simple to do: { echo header; cat file; } > file1 && mv file1 file | | If the source for such a command existed, would it be considered for | inclusion in coretuils? Probably not - the bar for adding new coreutils is rather high. Since this task can already be accomplished portably in shell, what benefit is there in adding a non-portable command to repeat the task - you can't rely on the new command's existence if you want to be portable to other machines. Finally, what syntax did you have in mind? It is probably possible to write a shell script that has that exact same syntax, but uses existing commands, to achieve the task without needing to add a new coreutil. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf4M2kACgkQ84KuGfSFAYDOogCfX+Wv2MO/iC8dxdd6HmKUIUsA sW8An2RIkuGsugojRepTmCDNtYPZXU/U =iQCV -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils