Using Winscp,putty to write Linux programs under Windows

Source: Internet
Author: User

The scenario described in this article implements the following functions: Using the scripting capabilities of WINSCP and putty to write code on the window platform, upload to Linux for compilation, and then take the compiled results. 3 files are required, respectively:

(1) Synchronize.bat
----------------------------------------
:: Need to change paths for WinSCP.exe and Putty.exe
:: Variables that need to be set
@SET Localpath=e:\work\projectname
@SET Remotepath=/home/username/work/projectname
@SET server=192.168.1.168
@SET port=22
@SET Username=username
@SET password=123456
@SET winscp= "D:\Program files\winscp\winscp.exe"
@SET putty= "D:\Program files\winscp\putty\putty.exe"

:: Occurs file to Linux machine "Linux commune www.LinuxIDC.com"
%winscp%/console/script=synchronize.script/parameter%username%%password%%server%%port%%localpath%%remotepath%

echo "Send done!"

:: Create a make shell
echo CD%remotepath% > make.sh
:: Echo Make clean >> make.sh
echo Make 1^>make.out 2^>make.out >> make.sh

:: Execute Make
%putty%-PW%password%%username%@%server%-P%port%-M make.sh

echo "Make done!"

:: Pass the result of make to the client
%winscp%/console/script=aftermake.script/parameter%username%%password%%server%%port%%localpath%%remotepath%

:: Show results after make
Cat Make.out

Pause

Http://www.bkjia.com/gjrj/800041.html

Using Winscp,putty to write Linux programs under Windows

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.