
shell
文章平均质量分 78
落冰翼
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
getopts命令行参数处理
转自:http://www.cnblogs.com/xiangzi888/archive/2012/04/03/2430736.html 一、getopts 简介 由于shell命令行的灵活性,自己编写代码判断时,复杂度会比较高。使用内部命令 getopts 可以很方便地处理命令行参数。一般格式为: getopts options variable geto转载 2016-04-26 15:27:47 · 389 阅读 · 0 评论 -
shell编程——if语句 if -z -n -f -eq -ne -lt
转自:http://www.dutycode.com/post-46.html if 条件 then Command else Command fi 别忘了这个结尾 If语句忘了结尾fi test.sh: line 14: syntax error: unexpected end of转载 2016-04-21 16:55:24 · 384 阅读 · 0 评论 -
shell截取字符串的方法
参考文献: linux中shell截取字符串方法总结 [Linux]如何在Shell脚本中计算字符串长度? 截取字符串的方法一共有八种,主要为以下方法 shell中截取字符串的方法有很多中, ${expression}一共有9种使用方法。 ${parameter:-word} ${parameter:=word} ${parameter:?word} ${parameter转载 2015-10-27 10:38:38 · 343 阅读 · 0 评论 -
linux解压多个文件
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原创 2016-06-12 10:42:45 · 2121 阅读 · 0 评论 -
mysql + shell 随机字符的产生方法
存储过程: drop procedure if exists test; delimiter // CREATE PROCEDURE test() BEGIN declare str char(62) default 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; declare str6 char(1);原创 2017-03-01 17:17:34 · 495 阅读 · 0 评论