cygwin

How do you run a binary file that neither Windows nor Cygwin can execute?

I haven't loaded up a VM of Linux yet (I have OpenSUSE on a VM on my machine), but whenever I run the executable under Cygwin, I get the error message "cannot execute binary file". Windows (PowerShell) tells me that it can't find the command that is the file name, or if I use ./, it tells me that no application can open this file. Also, ...

What is a good scripting language for basic file operations?

I often need to copy, move or rename files and directories based on some criteria as I collect data from many resources and I like to keep things organized. What scripting language provides the most intuitive and easy to use methods for these operations? Here is an example scenario: I keep my music in a folder hierarchy like below: &Ar...

What is the pricing model for cygwin in commerical applications?

Also, has anyone ever used it for a successful commercial application? Red hat is pretty vague on their website.. and have not answered my emails yet. ...

php shell_exec() through cygwin

I wrote a script that compiles LaTeX code through pdftex. The trouble is that pdftex only runs on linux. I am accomplishing this task with the use of shell_exec(). I don’t really have the ability to set up a linux box as a web server. I have my client computer, but it is behind a firewall that I do not control. I do have control of my ...

Git on Windows: How do you set up a mergetool?

I've tried msysGit and Git on Cygwin. Both work just fine in and of themselves and both run gitk and git-gui perfectly. Now how the heck do I configure a mergetool? (Vimdiff works on Cygwin, but preferrably I would like something a little more user-friendly for some of our more... Windows-loving coworkers.) Thanks! ...

How do I sort a tab seperated file on the nth column using cygwin sort?

I have a huge tab separated file which I want to sort on its 2nd column. I need to use the tab character as the field delimiter in cygwin sort. So I need something like this: sort -t \t -k 2,2 in.txt > out.txt But the command prompt evaluates '\t' literally and not as the tab character. Note that I need to do this on a Windows machine...

How to get date/time when file was placed in a directory on Windows?

Is there a way to tell when a file was moved to a certain directory? I'm being asked why a script of mine did not find a file in a certain directory. The file was created last January but I suspect it was placed in the directory after the script was run. Is there a way for me to confirm my suspicion? Viewing the file properties gives...

How can I make cygwin autocomplete windows paths?

I don't want to type /cygdrive/c/path/to/stuff, especially when using tools that don't know anything about cygwin. Is there a way to configure cygwin to autocomplete "c:\path\to\stuff" or even "c:/path/to/stuff"? ...

What's a good alternative Windows console?

UPDATE (solution) Months later someone turned me on to an awesome solution to this. If you install Git for Windows, it comes with this console app called Git Bash that does exactly what I descibed. I gather that it is derived from MinGW. It's easy and convenient and gives you all the Unix bash command line conveniences. Tab-completion w...

Installing Python 3.0 on Cygwin

The Question What is the correct way to install Python 3.0 alongside Python 2.x using Cygwin? Notes I already have a working copy of Cygwin, and Python 2.x is installed within Cygwin (/lib/python2.x, not c:\python2.x). Also, I would like to be able to call python 3 separately (and only intentionally) by leaving python pointing to Pyt...

Compile old C++ unix application for using in windows

I need to have a windows executable for some code which was written in 1994 for UNIX. I tried to do this from cygwin environment. The C++ standard was changed from this time and the standard libraries too. I tried to use -std= and -traditional-cpp options, but that options didn't helped me at all. I also found that -fno-for-scope and -f...

Trying to compile slapd on cygwin, what does this automake error mean?

I'm trying to compile a very old verion of slapd (the LDAP server) on cygwin. Previously this ran on a Linux box, but for reasons beyond my control it must be made to work on a Windows server. It has been suggested that we might use cygwin to compile up the source-code. Unfortunately the build fails during "configure" with the error mes...

Using expect to pass a password to ssh

How can I use expect to send a password to an ssh connection. say the password was p@ssword and the ssh command was ssh [email protected] What would I do with expect to a make it input the password when it says [email protected]'s password: ? The proper action of using an SSH key pair isn't an option because I would have to use ssh (scp) to pu...

How do I manually install an old cygwin package?

A project I am working on requires an old version of SLAPD (the LDAP server) and must run on Windows, hence I am using cygwin packages: I've found a binary package of slapd version I need 2.2.x here: http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/release/... How do I manually install it in cygwin? It does not seem to ...

Dealing with "C compiler cannot create executables" in Cygwin

Whatever I try to compile in Cygwin I get the following output: checking for mingw32 environment... no checking for EMX OS/2 environment... no checking how to run the C preprocessor... gcc -E checking for gcc... gcc checking whether the C compiler (gcc ) works... no configure: error: installation or configuration problem: C compiler ...

How can I modify my cygwin environment to use Strawberry Perl instead of the packaged Perl distribution?

I currently use Strawberry Perl as my primary Perl distribution. However, I have some applications that make Perl calls through cygwin. These generally fail because they are calling the version of Perl that was packaged with cygwin, and only looking in cygwin's lib folders. How can I modify my cygwin environment to call Strawberry Perl (...

Getting Expect to interact until the program terminates

I am using the linux too Expect and I have to interact with the shell. However, it's not a true interact, I just want to see what's going on. How can I get Expect to exit after the interacting program exits? ...

Cygwin and Python 2.6

New to python (and programming). What exactly do I need from Cygwin? I'm running python 2.6 on winxp. Can I safely download the complete Cygwin? It just seems like a huge bundle of stuff. ...

Setup standalone cygwin applications

I want to setup a minimal set of cygwin applications (ls, diff, path, find, grep) so that they run on a machine without the full cygwin install. I am assuming all I need are the *.exe files and *.dll that are relevant. So far, this is what I have. It works so far, but I was wondering if there are any issues down the road that I might ...

sed/awk: DOS to UNIX path substitution within a file

I have a file that contains this kind of paths: C:\bad\foo.c C:\good\foo.c C:\good\bar\foo.c C:\good\bar\[variable subdir count]\foo.c And I would like to get the following file: C:\bad\foo.c C:/good/foo.c C:/good/bar/foo.c C:/good/bar/[variable subdir count]/foo.c Note that the non matching path should not be modified. I know how...