loading
Shell 正则表达式

Linux Notes

2017.11.28

Shell 正则表达式

正则表达式是你所定义的模式模板 (pattern template),很多程序工具都能用它来过滤文本,在处理数据时使用正则表达式对数据进行模式匹配。如果数据成功匹配模式,它就会被接受并进一步处理;如果数据不匹配模式,它就会被滤掉 (跳过)。

Testing Dialog in shell scripts

Linux Notes

2017.11.28

Testing Dialog in shell scripts

Dialog is an utility for creating professional-looking dialog boxes within shell scripts, this article just follow the tutorial and present the examples of how and where it can be used.

Shell 中获取用户输入

Linux Notes

2017.11.27

Shell 中获取用户输入

尽管可以通过命令行选项和参数从脚本用户处获取输入,但有时脚本的交互性还需要更强一些,可以使用 bash shell 提供的 read 命令交互地获取用户输入。

Shell 脚本中的循环语句

Linux Notes

2017.11.13

Shell 脚本中的循环语句

结构化循环命令在编程中很常见。通常需要重复一组命令直到触及某个特定条件。比如处理某个目录下的所有文件、系统上的所有用户或某个文本文件中的所有内容。bash shell 提供了三个常用的循环命令 for、while 和 until,就来好好研究研究吧。

Shell 文件测试比较

Linux Notes

2017.11.08

Shell 文件测试比较

这些测试条件使你能够在 shell 脚本中检查文件系统中的文件。它们经常出现在需要进行文件访问的脚本中。

Bootstrap cards for showing colors

Web Notes

2017.11.06

Bootstrap cards for showing colors

A few days ago, I built a website for showing traditional Chinese colors with bootstrap cards. Several issues I encountered during this process, just write them down for records.

Upgrade Ruby to the lastest version on Mac OSX with Homebrew

Tutorials

2017.10.26

Upgrade Ruby to the lastest version on Mac OSX with Homebrew

Recently when installing some gems, it popped out errors that telling the Ruby version is lower than required... I have to upgrade the shipped Ruby, version 2.0.0p648 (2015-12-16 revision 53162), on my machine. There are a few methods dealing with this, but I found the easiest way is using Homebrew.