随笔分类 - Shell
摘要:#!/bin/sh#chkconfig: 2345 80 05#description: elasticsearch export JAVA_HOME=/usr/local/javaexport JRE_HOME=/usr/local/java/jreexport CLASSPATH=.:$JAVA
阅读全文
摘要:#!/bin/bash green='\e[1;32m' # green red='\e[1;31m' # red blue='\e[1;34m' # blue nc='\e[0m' # normal #set temp step clear # show system info setselinu
阅读全文
摘要:#!/bin/bash#设计一个shell程序计算n的阶乘,要求:#1.从命令行接收参数n;#2.在程序开始后立即判断n的合法性,即是否有参数,若有是否为正整数,若非法请给错误提示。#3.最后出计算的结果num=$1expr $num + 1 &>/dev/null[ $? -ne 0 ] && e
阅读全文