shell转化bat工具_shell脚本与bat转换

原shell脚本:

#!/bin/bash

remote_user="root"

remote_ip="10.138.60.76"

jar_file="vts-cbs-contract.jar"

local_path="vts-cbs-contract/target"

remote_path="/home/REQ501"

release_path="$remote_path"

backup_path="$remote_path/backup"

JAVA_PATH="/home/liuwentao/jdk-11.0.2/bin"

APP_PARAM="--spring.profiles.active=sit"

ssh $remote_user@$remote_ip "ps -ef | grep $jar_file | grep -v grep | cut -c 9-15"

if [ $? -eq 0 ]; then

ssh $remote_user@$remote_ip "mv $release_path/$jar_file $backup_path/$jar_file.`date +%Y-%m-%d-%k-%M`"

fi

if [ $? -eq 0 ]; then

scp $local_path/$jar_file $remote_user@$remote_ip:$release_path/

fi

if [ $? -eq 0 ]; then

ssh

你可能感兴趣的:(shell转化bat工具)