Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

How to place a shell variable into an xml file

Options
  • 05-04-2011 12:21pm
    #1
    Registered Users Posts: 5,560 ✭✭✭


    Hi - thanks if can help here

    Is there a way of taking a shell variable like $ROOTMO and placing into xml files


Comments

  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    Hi - thanks if can help here

    Is there a way of taking a shell variable like $ROOTMO and placing into xml files

    Err.... What language are you programming in?

    I mean in Bash scripting it would just be something like:

    echo -e "<XML>\n <rootmo>\n" $PATH "</rootmo> \n</XML>" >> xml_file.xml

    Can you explain a bit more what you are trying to do, OS, language, etc.?

    EDIT: I put $PATH in instead of $ROOTMO, just because on my system $PATH returned something $ROOTMO did not.


Advertisement