2015年12月7日

shell脚本中head命令的使用

摘要: shell脚本中head命令的使用在写shell脚本时,例如for循环中使用到了head命令错误的使用方式是:for i in $maptask;(此处少了;可加可不加)do #cat typescript | grep "number of splits:"* | awk -F ' ' '{pri... 阅读全文

posted @ 2015-12-07 20:17 小米辣 阅读(3764) 评论(0) 推荐(0) 编辑

Linux 系统命令(cd之类的)在shell脚本中无效解析

摘要: Linux 系统命令(cd之类的)在shell脚本中无效解析问题:在Ubuntu的终端上我们常用的cd之类的基本命令当写入shell脚本后,运行脚本该命令不能实现跳转(如./test)原因:执行shell脚本是在子shell上执行的,当shell脚本执行完退出子shell,所以看不到结果解决方法:s... 阅读全文

posted @ 2015-12-07 12:54 小米辣 阅读(1691) 评论(0) 推荐(0) 编辑

导航