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

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
主站蜘蛛池模板: 连平县| 苗栗县| 积石山| 福泉市| 永顺县| 禹城市| 高尔夫| 高州市| 大丰市| 美姑县| 武夷山市| 南投县| 峡江县| 平昌县| 遵化市| 泌阳县| 洛浦县| 太仓市| 台山市| 琼海市| 上蔡县| 凤翔县| 满洲里市| 连云港市| 惠来县| 眉山市| 阆中市| 上饶县| 东阿县| 慈溪市| 本溪| 祥云县| 北川| 棋牌| 奇台县| 乌什县| 平罗县| 蓝田县| 怀化市| 垦利县| 出国|