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

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
主站蜘蛛池模板: 平山县| 西充县| 新巴尔虎左旗| 镇赉县| 巢湖市| 威海市| 望城县| 犍为县| 中方县| 内乡县| 凤台县| 东平县| 钟祥市| 乌兰浩特市| 阿克苏市| 黄平县| 琼结县| 定州市| 信阳市| 屏东县| 舒城县| 通江县| 洪洞县| 甘洛县| 广平县| 安达市| 大余县| 桂阳县| 张家界市| 策勒县| 乐都县| 浦东新区| 绥中县| 福安市| 九江市| 乌兰察布市| 丹寨县| 仙桃市| 玉溪市| 襄樊市| 东海县|