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

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
主站蜘蛛池模板: 灵台县| 宜良县| 琼中| 宽城| 凉城县| 株洲市| 若羌县| 同仁县| 时尚| 滁州市| 文山县| 九龙县| 焉耆| 南昌市| 平南县| 凤冈县| 江孜县| 九龙坡区| 安溪县| 临漳县| 仁化县| 漾濞| 马边| 巫溪县| 剑阁县| 侯马市| 佛山市| 阿图什市| 东兰县| 鲁甸县| 泰顺县| 贞丰县| 运城市| 平潭县| 安宁市| 正宁县| 穆棱市| 乐都县| 凤城市| 琼海市| 沁水县|