How can I run Clozure CL in the Windows command line? - windows

I'm trying to install Clozure CL using their guide, and it wants me to add the files ccl and ccl64 to my path, but they have no file extension and Windows doesn't know how to run them.
I eventually looked in the file and it was headed by #!/bin/sh. As far as I know, I would need external software to get these files to run.
I want to know if there is some other workaround for setting up Clozure CL more easily, and if there isn't, what would I need to be able to run these files directly from the command line?

It appears that all the scripts do is run the file wx86cl64.exe in the main ccl directory as long as you're on Windows. So, all one needs to do is add the ccl directory to their path to achieve success.

Related

MobaXTerm how to create your own plugin?

Problem
I see all these plugins from MobaXTerm, but I don't know how to make my own. I see no links to any tutorials or whatever. Is there even a way to do it?
What I really want (XY problem)
I want to create my own commands. I want these to be available on each server I go to and I don't want to add each of these to my bin and .bash_profile etc. I think plugin is the way to go.
Even more background
I am not that good in shell programming, but I can program java. I created a jar which handles my commands. So I have created my own linux script on my local environment to test all these things. They work, but I dont want to 'export' them to other servers. Seems like a bad idea to do.
MobaXterm plugins are just Windows or Cygwin executables packaged in a .mxt3 file which is just a standard ZIP archive with a specific structure.
Read this from the MobaXterm FAQ:
I would like to create a new plugin for MobaXterm. How can I do that?
Download an existing plugin file (for instance "Midnight commander")
Rename plugin extension from ".mxt3" to ".zip"
Open the ".zip" file You will notice that creating MobaXterm plugins only consists in putting the required commands (executables, libraries
and configuration files) into a ZIP file, keeping the same folders
tree than in MobaXterm ("/bin", "/lib", "/usr", "/etc").
If you want to add a simple Windows program (exe file), you will just have to copy the executable file into the "/bin" directory,
create the ZIP archive, rename it to ".mxt3" and put it in the same
directory than MobaXterm executable.
If you want to add a Linux program, you will have to get it from the Cygwin project or to recompile it using make, gcc, g++ or other
compilers that are available from the MobaXterm "Development" plugin.
Remember MobaXterm's terminal is just Cygwin, so you may be able to cross compile some packages within Moba by simply installing the necessary compiler tools.

How can I execute a bash file (.sh) on PostgreSQL? On windows [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have bought and I use Windows 7 Ultimate, and I like to use it to develop applications. One of the down sides (as with every OS) is that I can not run Bash scripts. Is there a way to run Bash scripts on Windows by installing some software? It is ok if it does not work 100%, but as long as the most common functionality is available it should be great.
Install Cygwin, which includes Bash among many other GNU and Unix utilities (without whom its unlikely that bash will be very useful anyway).
Another option is MinGW's MSYS which includes bash and a smaller set of the more important utilities such as awk (you may also want to check the competing fork - Mingw-w64). Personally I would have preferred Cygwin because it includes such heavy lifting tools as Perl and Python which I find I cannot live without, while MSYS skimps on these and assumes you are going to install them yourself.
Updated:
If anyone is interested in this answer and is running MS-Windows 10, please note that MS-Windows 10 has a "Windows Subsystem For Linux" feature which - once enabled - allows you to install a user-mode image of Ubuntu and then run Bash on that. This provides 100% compatibility with Ubuntu for debugging and running Bash scripts, but this setup is completely standalone from Windows and you cannot use Bash scripts to interact with Windows features (such as processes and APIs) except for limited access to files through the DrvFS feature.
Best Option I could find is Git Windows Just install it and then right click on and click "Git Bash Here" this will open a bash window
This will open a bash window like this:
and the linux commands work...
I've tried 'sh' , 'vi' , 'ssh' , 'curl' ,etc... commands
If you're looking for something a little more native, you can use getGnuWin32 to install all of the Unix command line tools that have been ported. That plus winBash gives you most of a working Unix environment. Add console2 for a better terminal emulator and you almost can't tell you're on Windows!
Cygwin is a better toolkit overall, but I have found myself running into surprise problems because of the divide between it and Windows. None of these solutions are as good as a native Linux system though.
You may want to look into using virtualbox to create a linux VM with your distro of choice. Set it up to share a folder with the host os, and you can use a true linux development environment, and share with windows. Just watch out for those EOL markers, they get ya every time.
Best option? Windows 10. Native Bash support!
You can always install Cygwin to run a Unix shell under Windows. I used Cygwin extensively with Window XP.
After installing git-extentions (http://gitextensions.github.io/) you can run .sh file from the command prompt. (No ./script.sh required, just run it like a bat/cmd file)
Or you can run them in a "full" bash environment by using the MinGW Git bash shell.
I am not a great fan of Cygwin (yes I am sure it's really powerful), so running bash scripts on windows without having to install it perfect for me.
In order to run natively, you will likely need to use Cygwin (which I cannot live without when using Windows). So right off the bat, +1 for Cygwin. Anything else would be uncivilized.
HOWEVER, that being said, I have recently begun using a combination of utilities to easily PORT Bash scripts to Windows so that my anti-Linux coworkers can easily run complex tasks that are better handled by GNU utilities.
I can usually port a Bash script to Batch in a very short time by opening the original script in one pane and writing a Batch file in the other pane. The tools that I use are as follows:
UnxUtils (http://sourceforge.net/projects/unxutils/)
Bat2Exe (http://bat2exe.net/)
I prefer UnxUtils to GnuWin32 because of the fact that [someone please correct me if I'm wrong] GnuWin utils normally have to be installed, whereas UnxUtils are standalone binaries that just work out-of-the-box.
However, the CoreUtils do not include some familiar *NIX utilities such as cURL, which is also available for Windows (curl.haxx.se/download.html).
I create a folder for the projects, and always SET PATH=. in the .bat file so that no other commands other than the basic CMD shell commands are referenced (as well as the particular UnxUtils required in the project folder for the Batch script to function as expected).
Then I copy the needed CoreUtils .exe files into the project folder and reference them in the .bat file such as ".\curl.exe -s google.com", etc.
The Bat2Exe program is where the magic happens. Once your Batch file is complete and has been tested successfully, launch Bat2Exe.exe, and specify the path to the project folder. Bat2Exe will then create a Windows binary containing all of the files in that specific folder, and will use the first .bat that it comes across to use as the main executable. You can even include a .ico file to use as the icon for the final .exe file that is generated.
I have tried a few of these type of programs, and many of the generated binaries get flagged as malware, but the Bat2Exe version that I referenced works perfectly and the generated .exe files scan completely clean.
The resulting executable can be run interactively by double-clicking, or run from the command line with parameters, etc., just like a regular Batch file, except you will be able to utilize the functionality of many of the tools that you will normally use in Bash.
I realize this is getting quite long, but if I may digress a bit, I have also written a Batch script that I call PortaBashy that my coworkers can launch from a network share that contains a portable Cygwin installation. It then sets the %PATH% variable to the normal *NIX format (/usr/bin:/usr/sbin:/bin:/sbin), etc. and can either launch into the Bash shell itself or launch the more-powerful and pretty MinTTY terminal emulator.
There are always numerous ways to accomplish what you are trying to set out to do; it's just a matter of combining the right tools for the job, and many times it boils down to personal preference.
There's one more theoretical possibility to do it: professional versions of Windows have built-in POSIX support, so bash could have been compiled for Windows natively.
Pity, but I still haven't found a compiled one myself...

zip/compression command under Windows environment for COBOL program

I need to issue a zip/compression command from a COBOL program running on Windows platform, is there any built-in Windows specific command line command to zip the list of specified files, I cannot rely on 3rd party zip tools like winzip or 7zip.
I have tried compact command, is there any other alternatives to achieve this? please suggest.
Use zip.exe and unzip.exe available from http://www.info-zip.org/. The windows binaries can be downloaded directly from http://sourceforge.net/projects/infozip/files/.

Is there a way to run Bash scripts on Windows? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have bought and I use Windows 7 Ultimate, and I like to use it to develop applications. One of the down sides (as with every OS) is that I can not run Bash scripts. Is there a way to run Bash scripts on Windows by installing some software? It is ok if it does not work 100%, but as long as the most common functionality is available it should be great.
Install Cygwin, which includes Bash among many other GNU and Unix utilities (without whom its unlikely that bash will be very useful anyway).
Another option is MinGW's MSYS which includes bash and a smaller set of the more important utilities such as awk (you may also want to check the competing fork - Mingw-w64). Personally I would have preferred Cygwin because it includes such heavy lifting tools as Perl and Python which I find I cannot live without, while MSYS skimps on these and assumes you are going to install them yourself.
Updated:
If anyone is interested in this answer and is running MS-Windows 10, please note that MS-Windows 10 has a "Windows Subsystem For Linux" feature which - once enabled - allows you to install a user-mode image of Ubuntu and then run Bash on that. This provides 100% compatibility with Ubuntu for debugging and running Bash scripts, but this setup is completely standalone from Windows and you cannot use Bash scripts to interact with Windows features (such as processes and APIs) except for limited access to files through the DrvFS feature.
Best Option I could find is Git Windows Just install it and then right click on and click "Git Bash Here" this will open a bash window
This will open a bash window like this:
and the linux commands work...
I've tried 'sh' , 'vi' , 'ssh' , 'curl' ,etc... commands
If you're looking for something a little more native, you can use getGnuWin32 to install all of the Unix command line tools that have been ported. That plus winBash gives you most of a working Unix environment. Add console2 for a better terminal emulator and you almost can't tell you're on Windows!
Cygwin is a better toolkit overall, but I have found myself running into surprise problems because of the divide between it and Windows. None of these solutions are as good as a native Linux system though.
You may want to look into using virtualbox to create a linux VM with your distro of choice. Set it up to share a folder with the host os, and you can use a true linux development environment, and share with windows. Just watch out for those EOL markers, they get ya every time.
Best option? Windows 10. Native Bash support!
You can always install Cygwin to run a Unix shell under Windows. I used Cygwin extensively with Window XP.
After installing git-extentions (http://gitextensions.github.io/) you can run .sh file from the command prompt. (No ./script.sh required, just run it like a bat/cmd file)
Or you can run them in a "full" bash environment by using the MinGW Git bash shell.
I am not a great fan of Cygwin (yes I am sure it's really powerful), so running bash scripts on windows without having to install it perfect for me.
In order to run natively, you will likely need to use Cygwin (which I cannot live without when using Windows). So right off the bat, +1 for Cygwin. Anything else would be uncivilized.
HOWEVER, that being said, I have recently begun using a combination of utilities to easily PORT Bash scripts to Windows so that my anti-Linux coworkers can easily run complex tasks that are better handled by GNU utilities.
I can usually port a Bash script to Batch in a very short time by opening the original script in one pane and writing a Batch file in the other pane. The tools that I use are as follows:
UnxUtils (http://sourceforge.net/projects/unxutils/)
Bat2Exe (http://bat2exe.net/)
I prefer UnxUtils to GnuWin32 because of the fact that [someone please correct me if I'm wrong] GnuWin utils normally have to be installed, whereas UnxUtils are standalone binaries that just work out-of-the-box.
However, the CoreUtils do not include some familiar *NIX utilities such as cURL, which is also available for Windows (curl.haxx.se/download.html).
I create a folder for the projects, and always SET PATH=. in the .bat file so that no other commands other than the basic CMD shell commands are referenced (as well as the particular UnxUtils required in the project folder for the Batch script to function as expected).
Then I copy the needed CoreUtils .exe files into the project folder and reference them in the .bat file such as ".\curl.exe -s google.com", etc.
The Bat2Exe program is where the magic happens. Once your Batch file is complete and has been tested successfully, launch Bat2Exe.exe, and specify the path to the project folder. Bat2Exe will then create a Windows binary containing all of the files in that specific folder, and will use the first .bat that it comes across to use as the main executable. You can even include a .ico file to use as the icon for the final .exe file that is generated.
I have tried a few of these type of programs, and many of the generated binaries get flagged as malware, but the Bat2Exe version that I referenced works perfectly and the generated .exe files scan completely clean.
The resulting executable can be run interactively by double-clicking, or run from the command line with parameters, etc., just like a regular Batch file, except you will be able to utilize the functionality of many of the tools that you will normally use in Bash.
I realize this is getting quite long, but if I may digress a bit, I have also written a Batch script that I call PortaBashy that my coworkers can launch from a network share that contains a portable Cygwin installation. It then sets the %PATH% variable to the normal *NIX format (/usr/bin:/usr/sbin:/bin:/sbin), etc. and can either launch into the Bash shell itself or launch the more-powerful and pretty MinTTY terminal emulator.
There are always numerous ways to accomplish what you are trying to set out to do; it's just a matter of combining the right tools for the job, and many times it boils down to personal preference.
There's one more theoretical possibility to do it: professional versions of Windows have built-in POSIX support, so bash could have been compiled for Windows natively.
Pity, but I still haven't found a compiled one myself...

Portable unix-like environment for Windows

I am trying to put together a portable set of files/scripts that will enable me to mimic a unix like environment on Windows.
I do not want to install anything. The setup needs to be able to live on a thumbdrive for example. Currently I am using UnxUtils to provide grep, and more. Im adding these to the Windows PATH environment variable in the current console session by
cd <pathToUnxUtils>
path = %PATH%;%CD%
For Vim (my preferred editor) I am using the "Win32 console executable" (http://www.vim.org/download.php#pc) vim.exe. If I have that in a drive such as \vim\vim73\vim.exe then $VIMRUNTIME is \vim\vim73, which is where my vimrc lives.
I am trying to get some syntax highlighting and indenting going next, which I believe I need to add the appropriate .vim scripts to $VIMRUNTIME\syntax and $VIMRUNTIME\indent
but it does not seem to work.
I am using the console executible instead of something like gVim (which probably does more of what I want "out-of-the-box") because I want to be able to send commands to the same shell using the ! command. gVim does not allow that (correct me if I am wrong)
Lastly, has anyone experienced trouble with "tail" from UnxUtils working on Vista?
I know this probably seems like a stupid way to go about things, but I am really trying to make this work. Id be happy with getting these bits of Unix goodness going on Windows.
Thanks for any help
Check out cygwin portable: http://symbiosoft.net/cygwinportable
Or this guide on how to make regular cygwin run on portable devices: http://sites.google.com/site/devinsezer/Home/software/portable-cygwin
The advantage of cygwin over a thin emulation layer like UnxUtils is that it includes a fully working X11 server so you can even run GUI unix apps if you need to (gitk for example, if you're using git)
I've had some troubles with UnxUtils before re currency - they don't seem to be as up to date as the GnuWin32 stuff (for example, TextUtils at 2.1 instead of 5.3).
I've simply downloaded the executables and required libraries for what I've needed (no install needed if you avoid the setup packages, just copy and go).
If you click on the package names on the left of that second link above (not the "Setup" on the right), it allows you to download both the executable plus all dependencies on a single page.
My particular needs for a recent project were met with sed and about four DLL files, no installation, no impinging on the environment or registry. In short, ideal for running from a memory stick or standalone CD.
I must, at some point, put together a CD with the entire suite on it. I used to carry around CygWin but the necessity to install was a pain.
I'm using MobaXterm from Mobatek.
http://mobaxterm.mobatek.net/
It's not a complete envoirement, but is quite suficcient.
Just download and run!
It have an (ba)sh, with X, sed, grep, awk, rsync, wget, sftp, scp; and some extra plugins (standalone files to put in the same dir) to VIM, EMACS, perl python, Gcc, gdb, mplayer, svn, git, lua graphviz...
It still provides many protocols (RDP, VNC, SSH, telnet, rsh, FTP, SFTP and XDMCP).
Either MSYS or CH will do that, there is a specifically portable VIM at portable apps
Cygwin and MSYS provides all you need. I have used both and I think MSYS runs faster than Cygwin on a Windows machine. Cygwin emulates the UNIX environment whereas MSYS is port of the GNU utils to Windows.
Another option to get portable GNU utils is to install Portable MsysGit.
http://www.cygwin.com/ is very popular.
update: oh, never mind - I don't think it can be xcopy deployed.
-Oisin
I've had good luck with running Cygwin on a thumbdrive. I haven't run it on machines where older versions are installed. But I don't expect to have that problem often.
Here is what I did: http://fadedbluesky.com/2011/portable-cygwin/

Resources