Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

wms1

# Hello World Program in Bash Shell

path="atish_tasking.bat wq wm -tINFO "-Dlogging.config=logback.xml" "--spring.config.location=connector-config.yaml" "

arrays=', ' read -r -a array <<< "$path"
PARAMS=;
LOGLEVEL='ERROR'
SPRINGPARAMS=' '
LOGCONFIG=''
BATFILE=${array[0]}
echo ${BATFILE}
for index in "${!array[@]}"
do
    #echo "$index ${array[index]}"
    log="${array[index+1]:0:2}"
    #echo "$log"
    if [[ "$log" == "-t" ]]; then
      #length= expr length "${array[index+1]}"
        length=${#array[index+1]}
        level="${array[index+1]:2:length}"
        level="${level^^}"
        if [[ "$level" == "DEBUG" ]]; then
            LOGLEVEL="DEBUG"
            echo "$LOGLEVEL"
        elif [[ "$level" == "WARN" ]]; then
            LOGLEVEL="WARN"
            echo "$LOGLEVEL"
        elif [[ "$level" == "INFO" ]]; then
            LOGLEVEL="INFO"
            echo "$LOGLEVEL"
        elif [[ "$level" == "TRACE" ]]; then
            LOGLEVEL="TRACE"
            echo "$LOGLEVEL"
        else
            LOGLEVEL="ERROR"
            echo "$LOGLEVEL"
        fi
        
    
    elif [[ "$log" == "-D" ]]; then
            length=${#array[index+1]}
            if [[ "${array[index+1]:0:16}" == "-Dlogging.config" ]]; then
                LOGCONFIG="${array[index+1]:0:length}"
                echo "$LOGCONFIG"
            fi
    elif [[ "$log" == "--" ]]; then
        length=${#array[index+1]}
         if [[ "${array[index+1]:0:8}" == "--spring" ]]; then
        SPRINGPARAMS="${array[index+1]:0:length}"
        echo "$SPRINGPARAMS"
        fi
    else
        
        length=${#array[index+1]}
        param="${array[index+1]:0:length}"
        PARAMS=$PARAMS$tab$param
        tab=' ';
    fi
done
 echo "$PARAMS"
 
 echo java -cp wsm-0.0.16.jar $LOGCONFIG -Dlogging.level.root=$LOGLEVEL org.springframework.boot.loader.PropertiesLauncher $PARAMS $SPRINGPARAMS

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.