Skip to main content
Solved

Merge files via Script


Forum|alt.badge.img+9

Hey.
I'm facing a small issue that I want to fix.
We deploy VMWare Fusion and Virtual machines via Self Service.

Under /Library/Application Support/VMware/VMware Fusion/Shared it saves a file called vmInventory that lists the virtual machines that are shared on the local machine (as they are located in the /Users/Shared/VM folder.

Once a VM is added to the system via Self service I would like to add them to the file automatically.

cat xxx > vmInventory is not working as it not combines both files rather then overwriting the content of the existing vmInventory.

Any other idea?

Thanks in advance.

Best answer by mm2270

To add to a file you use >> not >. The single character will overwrite. Double will append.

View original
Did this topic help you find an answer to your question?

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • May 22, 2013

To add to a file you use >> not >. The single character will overwrite. Double will append.


Forum|alt.badge.img+9

Thanks Mike.
That done the trick. I only found > on the net.

Cheers


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings