Linux Shell Pushfiletoremoteserver.sh__linux

Source: Internet
Author: User

Cat pushfiletoremoteservice.sh


#!/bin/sh

Basedir= "' DirName $ '" arg_cnt=$#
If [$ARG _cnt-lt 3]; Then echo "Please use: $ dst_ip sshuser path_app-core" echo "Eg: $1.1.1.1 user/opt/app-core/" Exit fi
dst_ip=$1; dst_user=$2;
if [[[] $ =~. *[^/]$]]; Then dst_root=$3/; else dst_root=$3; Fi
CD "$BASEDIR" dir= "pwd" CD->/dev/null
# for Files (5): # Gearman-client-0.0.1-snapshot.jar # gearman-common-0.0.1-snapshot.jar # Kettle-core-5.3-snapshot.jar # Kettle-engine-5.3-snapshot.jar # tools-quartz-0.0.1-snapshot.jar # path01= "lib/" files01= "[^m]*-SNAPSHOT.jar"]
# for files (1): # Tools-odpsplugin-0.0.1-snapshot-odpsinput.jar # path02= "plugins/steps/odpsinputplugin/" FILES02= "* Odpsinput.jar "
# for files (1): # Tools-odpsplugin-0.0.1-snapshot-odpsoutput.jar # path03= "plugins/steps/odpsoutputplugin/" FILES03= " *odpsoutput.jar "
# for files (1): # Pentaho-big-data-plugin-5.3-snapshot.jar & # path04= "plugins/pentaho-big-data-plugin/" FILES04= " *-snapshot.jar "
# for files (1): # pentaho-hdfs-vfs-5.3-snapshot.jar # path05= ' plugins/pentaho-big-data-plugin/hadoop-configurations/ cdh52/lib/"files05=" *hdfs-vfs-*-snapshot.jar "
# for files (1): # pentaho-hdfs-vfs-5.3-snapshot.jar # path06= ' plugins/pentaho-big-data-plugin/hadoop-configurations/ hadoop-0.2x/lib/"files06=" *hdfs-vfs-*-snapshot.jar "
# for files (1): # pentaho-hdfs-vfs-5.3-snapshot.jar # path07= ' plugins/pentaho-big-data-plugin/hadoop-configurations/ hadoop-2.6/lib/"files07=" *hdfs-vfs-*-snapshot.jar "
# muti files scp-r $PATH 01$files01 $DST _user@ $DST _ip: $DST _root$path01
Scp-r $PATH 02$files02 $DST _user@ $DST _ip: $DST _root$path02
Scp-r $PATH 03$files03 $DST _user@ $DST _ip: $DST _root$path03
Scp-r $PATH 04$files04 $DST _user@ $DST _ip: $DST _root$path04
Scp-r $PATH 05$files05 $DST _user@ $DST _ip: $DST _root$path05
Scp-r $PATH 06$files06 $DST _user@ $DST _ip: $DST _root$path06
Scp-r $PATH 07$files07 $DST _user@ $DST _ip: $DST _root$path07
echo "=========================================" echo "Files pushed! Please check the DST files! >> "
Ls-l $PATH 01$files01 ls-l $PATH 02$files02 ls-l $PATH 03$files03 ls-l $PATH 04$files04 ls-l $PATH 05$files05 ls-l $PATH 0 6$files06 ls-l $PATH 07$files07

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.