Originally posted by nitin_batta
One note using >> will not create a new file if it is not present.
if you plan to put the output in a new file do
$ls >> myfile
I just tried using >> without the touch on my mandrake 10 and it actually creates the file... so...
so I see no need of using touch for this. Although It can't hurt.
Again, asDalek says, you should test it before using it.
cat <file> <whatever you want to add> > file
You can concatenate (cat) the file with whatever you want to add and the redirect it to the file itself... that should work.
Although I'm a
and this could not work... I believe it would.