0

I have a bash script that runs through several folders and processes the files' content. The resulting file, newFile I want to append to a file in another folder. This file has the same name (newFile). So, I do this

cat $outfn1 >> /newFolder/newFile

But this does not work. The newFile is surely moved to the newFolder. However, it is not appended to the old version of the newFile, which is what I would like it to do. It replaces the old version.

Is there any way around this one? Thank you.

jd

SigneMaten
  • 493
  • 1
  • 6
  • 13
  • Grrr. There are no "folders" in a file system. There are directories. Folders contain files, directories do not. Directories contains names of files. A folder is an abstraction of the gui. – William Pursell Mar 03 '15 at 13:31
  • I tested `cat $outfn1 >> /newFolder/newFile` and it works, it appends the content of the new file to older version of the new file. – dsharew Mar 03 '15 at 13:35

0 Answers0