Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cygwin and alternatives to replicating linux commands on windows

I keep running into issues with a .bat script I want to write to automate some tasks related to the setup of my PHP application. I can't for instance do simple wget to download files and so on.

I hear that by installing Cygwin, the user should be able to have access to all linux related commands, so my script will run without problems.

Another way is to get the user to download each GnuWin32 version of the commands I'm using in my script, like wget, gzip, diff but this sounds like a lot more trouble than installing a single Cygwin program.

Can someone recommend the easiest approach here.. Is Cygwin the standard or are there easier alternatives.

like image 321
Berming Avatar asked Feb 27 '23 03:02

Berming


2 Answers

I haven't heard of alternatives to Cygwin, and from my personal experience, it seems like it would perfectly suit your needs. You'll just need to launch your script from Cygwin's shell instead of Windows' prompt, but that hardly is a problem.

like image 192
Anthony Labarre Avatar answered Mar 01 '23 01:03

Anthony Labarre


If you are having problems with batch files then rather than install Cygwin, I'd look at PowerShell and WScript.

like image 33
Lazarus Avatar answered Feb 28 '23 23:02

Lazarus