I have a java code under eclipse that is calling a .ksh script. The OS is Windows7.
I am a complete noob in shell things and the code (both java and ksh) were not written by me (and I cannot change it).
Anyway, when it tries to launch the script, the common Windows popup appears to let me choose a proper application. Given that, I have installed cygwin, but in cygwin/bin/ there is no ksh.exe at all. Even more, I didn't find any on google.
Is there any other way to launch the ksh under Windows?
Thanks in advance
I finally found a log:
C:\Users\Andrea\Desktop\AppXXX\Scripts\Model\Launchksh[35]: mkdir: not found
C:\Users\Andrea\Desktop\AppXXX\Scripts\Model\Launch.ksh[37]: can't create /rep/log/Launch_model.log: No such file or directory
It doesn't find mkdir, is it not an issue related with cygwin?
You need to install the mksh (MirBSD Korn Shell) package. Re-run setup and select mksh.
Ok, I solved the mistery. In the PATH variable there was no reference to the cygwin/bin folder. I manually add it and now it runs!
Thanks all
Related
I installed msys2, and then integrated the installation of Git-For-Windows within that msys2 environment, by applying this simple procedure.
After doing so, I'm getting this error when I double-click the msys2 desktop icon:
bash: create-shortcut.exe: command not found
bash: create-shortcut.exe: command not found
jdoe#msys2$
I can see where the above error originates :
The aforementioned procedure created this new script - /etc/profile.d/git-sdk.sh - which attempts to run the create-shortcut.exe command; but (like the script) I can't find where create-shortcut.exe is.
Does anyone know where that create-shortcut.exe comes from (MSYS2, MS-WINDOWS), or where it might be located? Or perhaps even know what the fix for this is? =:)
Thank you in advance.
Thank you to the commenters.
It's a bug, either because the referenced command wasn't included in the package, or because the command is not in the script's PATH. I'll file an issue in the GitHub project for it.
Thank you particularly to #HolyBlackCat for pointing out that the procedure wasn't necessary since git(1) is already available in MSYS2s default repositories. (I'm new to MSYS2 because I was provided a Windows environment instead of Linux). So, I ended up backing out the procedure and installing the native repository version instead, which works well.
However, if you did want to keep the version provided by the procedure -- because it does, indeed, offer more than just the git(1) command (e.g., it has an SDK too) -- then you can simply locate and safely comment-out the offending section in the /etc/profile.d/git-sdk.sh RC script, whose only purpose is to create a Windows desktop icon. Hopefully this helps others.
I am simply trying to set up a dev environment to code on my Windows 10 PC for use alongside my Mac when I need it.
I have installed Bash, Z shell and Node.js.
All I want to do, bare minimum, is simply:
Be able to run npm commands, etc. (npm install X)
Open files with appropriate programs from the terminal. (on Mac, I can run open index.html or atom .)
My problem: Literally no commands work. I can't run node -v, I can't do start index.html, I can't even open the current directory I'm in with explorer.
For every command, I receive an error: zsh: Command not found (:node/start/explorer/etc.)
I am guessing it has something to do with my PATH variables? I'm not sure; I'm relatively new...
Please help - I've spent four hours searching Google, Stack Overflow, page after page, but somehow can't find a solution.
Thanks.
Sounds like you have an 'eco-system challenge'... :)
Perhaps whatever tool you used to install the tools you mention:
did not do a complete install OR
requires a 'reboot' to enable all the goodies?
I suggest using a small footprint Linux OS in a VM for this type of tinkering; there are many challenges in using *nix tools on Windows - better to learn/experiment in a more Bash-friendly environment, and then, when comfy, bring the tool sets to another OS.
If you still want to give things a whirl:
locate your Bash binary
Right-click and select 'run as admin'
then use your favorite online Bash tutorial or book to explore...
:)
Dale
I'm trying to set up Jenkins for continuous integration.
At the moment, I'm trying to do something very simple but am running into issues and I'm not sure if I'm doing something wrong or what I'm trying to do just isn't possible.
I currently have a file, which shows up on PC as a Windows batch file and on Mac as a Unix executable file. I run it from Mac and it uses xcodebuild and xcrun to make and share archives.
What I want to do for now is just have Jenkins do this for me (I'll add more stuff later) so I add added a build step and typed in the path to the batch file:
users/mcbuild/documents/work/fts/ArchiveFTS.bat
However, when I click build I get this:
Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/jobs/FTS Build/workspace
[workspace] $ cmd /c call /var/folders/2n/gysykb914qlgtg2b0flhvh4r00007c/T/hudson6994878138376885970.bat
FATAL: command execution failed
java.io.IOException: Cannot run program "cmd" (in directory "/Users/Shared/Jenkins/Home/jobs/FTS Build/workspace"): error=2, No such file or directory
From searching around, I found a couple of possible solutions:
Had to specify the shell to C\windows\system32\cmd.exe
I'm not sure what this means or how to do this, can someone explain this please?
I'm not sure but doesn't it look like Hudson is trying to execute a .bat script on a Unix system?
Does that mean what I'm trying to do isn't possible and if not, what are my options please?
Some suggestions involve checking which user you're using Hudson as and maybe changing that
I'm not sure what user I am using it as or why it comes up as anonymous
Is there an issue with it being anonymous and if so, how do I change it please?
Thanks in advance for your help. If you need any more information please let me know.
It appears that you added a build step of type "Execute Windows batch command", but you are running this job on a Mac. What you need to do is run your xcode/xcrun file from an "Execute shell" build step. If you still have problems, make sure you can manually run the same file from a command prompt on the Mac (not by clicking on it). If you get an error about "Cannot run program sh", you may need to configure the path to sh. Type "which sh" at a command prompt to find out where sh is located. Click on Manage Jenkins, then Configure System, and enter the path under Shell Executable.
I just started studying Unix shell scripting. I use a Windows XP. Just want to know which all Cygwin packages I need to install to run the bash scripts and commands in Windows.
Thanks
The packages included in the (default) Base installation should be enough for that purpose.
Vixies Cron, will get you started with a linux like crontab for windows. Also cygstart will launch applications very well. Also make sure you install collection of type things from the cygwin setup.
I am a Mac user at home, but am forced to use a windows machine at work. I want to install Cygwin on my work machine to leverage the power of the bash prompt but I need to make sure that it doesn't replace the windows command line. I searched around on the internet and was unable to answer my question.
So, does anyone know... If I install Cygwin will the IT guy at my work still be able to use the Windows Command Prompt or will Cygwin replace it?
It will not replace cmd. It is independent software.
Yes, do it. Cygwin installs a bunch of programs that run under Windows. It does not remove or replace cmd.
I use both CMD and Cygwin (via mintty) at work depending upon the situation. The IT guys use whatever they need to work on the system. Cygwin is installed into a separate directory and launches its own environment and doesn't remove anything that exists on your system.