
bash的学习
xiaocaichonga
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
echo 与printf的异同
相同点:echo与printf 都是bash的内置命令不同点:echo返回0状态,并且在标准输出输出。 printf可以返回不同状态,并且可以格式化输出。Both echo and printf are Bash built-in commands. The first always exits with a 0 status,原创 2012-07-30 21:34:26 · 644 阅读 · 0 评论 -
linux中cron的使用
cron是linux的一个定时执行工具,可以在无需人工干预的情况下运行作业。其在执行脚本时,必须使用完整的路径名,以及对标准输出和标准出错进行重定向。因为cron是在非交换式情况下执行的,任何错误都可能使脚本执行退出。来源:http://fanqiang.chinaunix.net/system/linux/2005-06-13/3306.shtmlcron是一个linux下的转载 2012-07-30 21:51:56 · 698 阅读 · 0 评论 -
the system logging daemon
来源:http://www.tutorialspoint.com/unix/unix-system-logging.htmUnix systems have a very flexible and powerful logging system, which enables you to record almost anything you can imagine and th转载 2012-07-30 22:29:08 · 216 阅读 · 0 评论 -
getopts
getopts optstring name [args] getopts is used by shell procedures to parse positional parame‐ ters. optstring contains the option characters to be recog‐转载 2012-07-31 11:00:03 · 413 阅读 · 0 评论 -
scp
scp用于网络间两个主机之间文件的安全传输。参考文献: scp — secure copy (remote file copy program)SYNOPSIS scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_opt原创 2012-07-31 14:29:42 · 426 阅读 · 0 评论 -
$*与$@的异同
两者都代表bash命令行参数,在没有用双引号括起来的时候,两者效果一样但是两者若被双引号括起来,就有不同了$*会显示出参数见的分隔符,而$@则不会。这是因为前者被解读为一个整体字符串,而后在解读为一个个分开的字符串参考文献:http://bash.cyberciti.biz/guide/$IFSIFS Effect On The Values of "$@" And原创 2012-07-31 13:59:25 · 432 阅读 · 0 评论 -
登录shell 非登录shell /etc/bash.bashrc /etc/profile ~/.bashrc ~/.profile
登录shell 和非登录shell 对于用户而言的区别就是:在登录和执行时shell时 启动文件不同 登录shell 登录时对应 /etc/profile 执行时 ~/.bash_login or ~/.bash_profile or ~/.profile非登录shell 执行时 /etc/bash.bashrc ~/.bashrc原创 2013-04-12 20:52:39 · 944 阅读 · 1 评论