- Bash Cookbook
- Ron Brash Ganesh Naik
- 105字
- 2021-07-23 19:17:40
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
推薦閱讀
- Java逍遙游記
- 從零開始:數字圖像處理的編程基礎與應用
- GraphQL學習指南
- Python數據可視化:基于Bokeh的可視化繪圖
- C語言程序設計實訓教程
- Elastic Stack應用寶典
- Building an RPG with Unity 2018
- Mastering JBoss Enterprise Application Platform 7
- Clean Code in C#
- Windows Phone 8 Game Development
- Visual Basic程序設計全程指南
- SEO教程:搜索引擎優化入門與進階(第3版)
- ROS機器人編程實戰
- Node.js實戰:分布式系統中的后端服務開發
- 量子計算機編程:從入門到實踐