
shell
Stick_t
这个作者很懒,什么都没留下…
展开
-
tomcat 服务管理脚本
为了方便管理tomcat,比如查看tomcat进程、启动、关闭杀进程、重启、看日志,写了个脚本。#!/bin/bashus=bosstomcat_dir="/home/boss/inv_server0"if [ -d ${tomcat_dir} ]; then cd ${tomcat_dir}else echo "cannot find serverdir...exit" ...原创 2018-10-26 16:11:54 · 314 阅读 · 0 评论 -
shell 字符串截取、判断操作
shell操作做常用的就是字符串的处理了字符串的截取 有好多方法和函数,一下记录常用的几种:截取前5位、8位、3位 [boss@123 ~]$ str=1234567890[boss@123 ~]$ echo "$str" | cut -c1-512345[boss@123 ~]$ echo "$str" | awk '{print substr($0,1,8)}'1234...原创 2018-10-26 17:19:24 · 1408 阅读 · 0 评论