using echo 'text' > file (to add to last line of several documents)

mike hoy mhoy06 at gmail.com
Wed Oct 20 23:14:34 MST 2010


is it possible to simply add text to the bottom of multiple files or even
one?

for example let's say I want to add to the bottom of several files:

<?php include("../includes/footer.php"); ?> to the bottom of 1.php

echo '<?php include("../includes/footer.php"); ?>' > 1.php


that would result in over writing the entire file

cat 1.php

 <?php include("../includes/footer.php"); ?>



I've checked around and there seems to be no append option

was thinking I could make a python script to do it for me but thought I'd
run it by you guys see if you had any ideas. There are times when I want to
do stuff along these lines and just want to find the right 'approach' to
solving the problem

also I imagine there exists some command in bash that would work much
better, thanks in advance.

-- 
Mike Hoy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20101020/f7c2f050/attachment.html>


More information about the PLUG-discuss mailing list