官术网_书友最值得收藏!

Getting ready

Let's get ready for the exercise by creating some data sets which mimic common daily problems:

$ cd ~/
$ echo
$ echo -e "XML_HDR='<?xml version="1.0" encoding="UTF-8"?>'\\nSRT_CONTR='<words type="greeting">'\\nEND_CONTR='</words>'" > xml-parent.tpl
$ echo -e "ELM='\"<word lang=\"\$1\">\"\$2\"</word>\"'" > word.tpl
$ echo -e "\"EN\",\"Hello\"\n\"FR\",\"Bonjour\"" > words.csv
In Bash, the single quote ( ') is used for literal strings. In this case, we want every part of the string to be present without escaping slashes and double quotes.

To operate this script, you have the following applications installed for use within the script:

$ sudo apt-get install npm sed awk
$ sudo npm install -g xml2json-command
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
主站蜘蛛池模板: 丰台区| 长葛市| 佛坪县| 德化县| 寻甸| 海宁市| 隆化县| 象州县| 河曲县| 万源市| 获嘉县| 旬邑县| 通道| 宜州市| 鹿泉市| 河北省| 信宜市| 宜良县| 龙胜| 临洮县| 安新县| 丰镇市| 陕西省| 白城市| 涿州市| 镇沅| 花莲市| 施秉县| 阳江市| 炉霍县| 荔浦县| 蓝田县| 郧西县| 蓝山县| 安福县| 通辽市| 米易县| 四子王旗| 阿拉尔市| 兖州市| 岢岚县|