Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

How to place a shell variable into an xml file

  • 05-04-2011 12:21PM
    #1
    Registered Users, Registered Users 2 Posts: 5,753 ✭✭✭


    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