03 2014 档案

摘要:在shell中,source与.是等同的,而./是有些细微的不同的,尽管都是在执行命令或者脚本。source或.执行后面的脚本,直到有return出现退出。下面是在网上搜集的关于此的讨论(暂时没有看懂)BASH脚本可以以 . 或 source内置命令来执行, 也可以直接执行脚本文件(需要首行有#!/path/to/bash并且文件是可执行的), 这两种情况是有一些微妙区别的.1. 以.或source这两个等价的builtin来执行脚本时是在当前的SHELL解释器中直接读取命令来执行, 所以可以通过这个脚本改变当前SHELL的环境变量, 脚本中的exit所退出的也自然是当前这个SHELL, 这一 阅读全文
posted @ 2014-03-26 16:34 TobyDev 阅读(212) 评论(0) 推荐(0)
摘要:Themailx or mailcommand in Linux is still providing service for guys like me, especially when we need to send email automatically by script. gmail is great. Now, how to use gmail’s smtp in mailx/mail? gmail is a little special since gmail’s smtp server requires tls authorization. The good news is th 阅读全文
posted @ 2014-03-25 11:29 TobyDev 阅读(1229) 评论(0) 推荐(0)