那些年写过的shell---the function of debug

来源:互联网 发布:读图知天下 编辑:程序博客网 时间:2024/05/22 13:08
#! /bin/bash
################################################
##Author:   freeking
##Created:  Oct 27th 2013
##Description  enable the debug useage
################################################
DEBUG="dd"

function debug()
{
    if [ $DEBUG ]
    then
        echo ">>>>>"
    fi  
}   

#function debug1() { (($DEBUG)) && echo "====== $*";}
function debug2() { [ "$DEBUG" ] && echo "-------$*";}
debug "Trying to find config file"
#debug1 "Trying ================="
debug2 "Trying
原创粉丝点击