Wrote a batch-managed bash applet that took advantage of the Redhat native Expect,wget package group.

Source: Internet
Author: User

Paste the following readme:

#myexpect V1.0 Released

#auth [email protected]

#env description

Myexpect server Requires:bash is needed Ofcource

Expect for answer password

VSFTPD for client-to-down load scripts upload files etc.

Myexpect client Requires:ftp for upload

Wget for down load

Python possible if want to run Python scripts

#file and Direcory description

#files in Myexpect server

Tree/server-scripts

/server-scripts: Scripts in Myexpect server

├──exc-py.sh: You can use exec-py.sh [yourscript.py] to run Python scripts on the hosts defined in hosts

├──exc-sh.sh: You can use exec-sh.sh [yourscript.sh] to run bash scripts on the hosts defined in hosts

├──hosts.pass: Host file likes [IP port username password],you ' d better change it before use it

├──mrelease.sh: Run this scripts to the CP files in/var/ftp/pub to the hosts defined in Hosts.pass

└──ssh.exp: This file was used to answer what are asked in shell scripts


tree/var/ftp/pub/: You can put scripts Here,and it'll be run on the hosts defined in Hosts.pass when you run ex C-py or Exc-sh on Myexpect-server

/var/ftp/pub/

├──gatherinformation-2.0.py:p Ython Scripts

├──oscheck.sh: Bash scripts

├──storage_check.sh: Bash scripts

└──uploadreport.sh: Bash scripts


#files in Myexpect Client

tree/client-scripts/

/client-scripts/

├──gatherinformation-2.0.py:p Ython Scripts

├──oscheck.sh: Bash scripts

├──storage_check.sh: Bash scripts

└──uploadreport.sh: Bash scripts



#how to use Myexpect?

1) put Yourscript in/var/ftp/pub

2)/server-scripts/mrelease

3)/server-scripts/exc-sh [yourscript.sh]


This article is from the "Advance Bar Rookie" blog, please make sure to keep this source http://chentp.blog.51cto.com/10638759/1744436

Wrote a batch-managed bash applet that took advantage of the Redhat native Expect,wget package group.

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.