How to execute Unix shell script from Windows?

Let’s learn how to execute Unix shell script from Windows. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

unable to execute a .sh script with Jsch

i'm trying to execute a script shell in a unix server from my java application (on my windows seven station) using the ssh api Jsch. the script shell i'm using "start_lm" is a C binary. this is the code i'm using (it's from the Jsch website exemples) try{ JSch jsch=new JSch(); Session session=jsch.getSession(user, host, 22); UserInfo ui=new MyUserInfo(); session.setUserInfo(ui); session.connect(); String command="user/psi/start_lm"; Channel channel=session.openChannel...

Answer:

There's the problem I believe ". ./start_lm.sh It should be below provided script present in current...

Read more

sm1988 at Stack Overflow Mark as irrelevant Undo

Other solutions

Why did Microsoft never develop the command prompt like the Unix shell?

If you have been using Unix for some time now (mostly as a software developer) and use Windows for some tasks, it is quite likely you would not find the same kind of functionalities on Windows command prompt. Shell scripting gave so much power to Unix...

Answer:

There's plenty of analogous commands for PowerShell that match the functionality of Unix: UNIX For DOS...

Read more

Joseph Marhee at Quora Mark as irrelevant Undo

Unix Scripting

Unix scripting question- how do I automate an interactive command-line application? [MI] I'm using a proprietary FTP application to transmit a file each day, and pick up a receipt of the prior day's file. The application accepts various command line...

Answer:

expect is great for this sort of thing. It even has a learn mode that lets you do some tasks then creates...

Read more

mkultra at Ask.Metafilter.Com Mark as irrelevant Undo

Is there something better than Bash for shell scripting?

Tomorrow I have to script a bunch of tasks using bash and, frankly, I am not looking forwards to it.  Any suggestions for something similar but better?  It has to be lighter-weight than Python, stable, and the ability to use it on Windows as well as...

Answer:

Back in the dark ages, this question was asked frequently, and the inevitable result was the creation...

Read more

Mark Nelson at Quora Mark as irrelevant Undo

Microsoft Backticks

How do I get the ouput of a windows console program / script into a batch file variable? Unix user here, trying to translate a shell script into a batch file that will run in a Windows command shell environment. I need to get the output of a program...

Answer:

You can probably do this in an XP batch file. Read the help for the "for" statement, for ...

Read more

Deepspace at Ask.Metafilter.Com Mark as irrelevant Undo

Folders appear on pendrive and reappear when deleted. How can I completely delete it?

I have a problem, folders appear on pendrive and reappear when deleted. The folder is 'My Document' and 'Download' and also ('servieca'--a vbs script file...) I have deleted all and format and also reformat my pendrive, but the file and folders reappear...

Answer:

i do believe you've got some malware installed on your pendrive, or maybe it's on the computers you...

Read more

6neezamhalim9 at Answerbag.com Mark as irrelevant Undo

Parsing DLL in VB.Net

I am trying to "Register an Application to a URL Protocol" (Refer to: http://msdn.microsoft.com/workshop/networking/pluggable/overview/appendix_a.asp?frame=true ) I ran the registry script (provided in the article): [HKEY_CLASSES_ROOT] [note...

Answer:

Hi. This is a pretty straightforward question. The following snippet of VB.NET code will compile and...

Read more

bacteriaa-ga at Google Answers Mark as irrelevant Undo

Unix: What is the best way to get script (typescript) to work with a restricted shell?

I have a scenario where I want to log every activity for a particular  user. I have a script built around the script command which I invoke  from the user's .profile. Now the requirement is that the user should  not be able to delete the subsequent typescript...

Answer:

I guess you need to set default shell for your user as rksh. You can do this while adding a user using...

Read more

Vishwajit Paste at Quora Mark as irrelevant Undo

Tips as to UNIX Shell Script to Programmatically Save a Webpage as a Text File

I'm writing a shell script to take a webpage and convert it into a text file. I'd appreciate tips as to how to store URLs, save the file with the URL's title as its name, and also just general tips as to how to improve the script and/or achieve the process...

Answer:

3. Yes. Use Perl.

Read more

WCityMike at Ask.Metafilter.Com Mark as irrelevant Undo

UNIX shell script question?

Hi guys, I want to create a shell script file (let's say 'answers'), which will call another script file (let's say 'questions'). The 'questions' script will ask three questions: what's your name?, what's your address?, who is your wife?. Then, 'answers...

Answer:

I'd use a temp file and have questions write the results there, and then answers can open it. You may...

Read more

dhtjtks33 at Yahoo! Answers Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.