随笔分类 -  shell

摘要:存储过程: drop procedure if exists test; delimiter // CREATE PROCEDURE test() BEGIN declare str char(62) default 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN 阅读全文
posted @ 2017-03-01 17:17 SandKing 阅读(8) 评论(0) 推荐(0)
摘要:ls ./*.zip | xargs -n1 unzip ls *.tar | xargs -i tar -xvf {} find . -name '*.zip' -exec unzip {} \; for i in * > do > unzip $i > done #!/bin/bash for 阅读全文
posted @ 2016-06-12 10:42 SandKing 阅读(8) 评论(0) 推荐(0)
摘要:转自:http://www.cnblogs.com/xiangzi888/archive/2012/04/03/2430736.html 一、getopts 简介 由于shell命令行的灵活性,自己编写代码判断时,复杂度会比较高。使用内部命令 getopts 可以很方便地处理命令行参数。一般格式为: 阅读全文
posted @ 2016-04-26 15:27 SandKing 阅读(5) 评论(0) 推荐(0)
摘要:转自:http://www.dutycode.com/post-46.html if 条件 then Command else Command fi 别忘了这个结尾 If语句忘了结尾fi test.sh: line 14: syntax error: unexpected end of fi if 阅读全文
posted @ 2016-04-21 16:55 SandKing 阅读(10) 评论(0) 推荐(0)
摘要:参考文献: linux中shell截取字符串方法总结 [Linux]如何在Shell脚本中计算字符串长度? 截取字符串的方法一共有八种,主要为以下方法 shell中截取字符串的方法有很多中, ${expression}一共有9种使用方法。 ${parameter:-word} ${parameter 阅读全文
posted @ 2015-10-27 10:38 SandKing 阅读(12) 评论(0) 推荐(0)