Use Winscp and Putty to write Linux programs in Windows

Source: Internet
Author: User
The solution described in this article implements the following functions: winscp linux download Use the winscp and putty script functions to compile code on the Window platform, upload it to Linux for compilation, and then obtain the compilation result. Three files are required, winscp command line copy file from windows to linux respectively: winscp linux (1) synchronize. bat --------------------------------------------: Modify winscp.exeand putty.exe paths:winscp for linux mint  The variable to be set @ SE

The solution described in this article implements the following functions: Use the winscp and putty script functions to compile code on the Window platform, upload it to Linux for compilation, winscp linux alternative  winscp from windows to linux and then obtain the compilation result. Three files are required:winscp para linux ubuntu

(1) synchronize. bat
----------------------------------------
: You need to change the WinSCP.exe and putty.exe paths.
: Variables 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"

: A file is generated on the linux Server [LINUX community www.LinuxIDC.com]
% Winscp %/console/script = synchronize. script/parameter % username % password % server % port % localpath % remotepath %

Echo "Send Done! "

: Create 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. winscp for linux ubuntu sh

Echo "Make Done! "

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

: Displays the result after make.
Cat make. out

Pause

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.