I want to append a certain text at the end of a file. How can I do this?

asked 12 Sep '11, 07:22

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%


You can append text at the end of a file using an addTextToFile action. You will have to include a section like the one below inside an action list section of your XML installer project file.

      <addTextToFile>
          <file>${installdir}/bin/environment.sh</file>
          <text>export JAVA_HOME=${installdir}/jre
          export PATH=$JAVA_HOME/bin:$PATH</text>
      </addTextToFile>
link

answered 12 Sep '11, 07:23

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×21
×6

Asked: 12 Sep '11, 07:22

Seen: 1,448 times

Last updated: 12 Sep '11, 07:23