GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I hope this is the right forum for this topic...it didn't really seem to fit in any of the others.
Basic Question:
Is there an easy way to run simple bash scripts calling only a few commands on Windows without installing a full emulator?
Details:
I have a bash script that is designed to help a friend with a Windows computer issue. It is one line long, and only calls a few linux commands. (So I don't need to be able to call awk, grep, ls, rm, etc.) Since I don't have physical access to the computer, it would be too complicated to boot into a live cd, or install something like cygwin--I'm looking for something simple for the end user. (Something that I can load up into a folder and have a single "Click here" batch file that does everything.) I've tried UnixUtils, but that didn't work with my script. All the script does is call the find command and format the output through sed and a few other commands. I just assumed that it would be easy to port over to Windows, but none of the Windows emulators will execute the script, which works fine on OS X.
I'm looking for a standalone bash environment that will run my script and point the appropriate commands to the right executables. All of the programs have been ported to windows.
I'd greatly appreciate any help with this problem.
How can you do a partial install? Did I miss something in the documentation? Also, even when I do a full install, it doesn't work. None of the commands work when I launch the shell--not even ls.
I hope this is the right forum for this topic...it didn't really seem to fit in any of the others.
Basic Question:
Is there an easy way to run simple bash scripts calling only a few commands on Windows without installing a full emulator?
Details:
I have a bash script that is designed to help a friend with a Windows computer issue. It is one line long, and only calls a few linux commands. (So I don't need to be able to call awk, grep, ls, rm, etc.) Since I don't have physical access to the computer, it would be too complicated to boot into a live cd, or install something like cygwin--I'm looking for something simple for the end user. (Something that I can load up into a folder and have a single "Click here" batch file that does everything.) I've tried UnixUtils, but that didn't work with my script. All the script does is call the find command and format the output through sed and a few other commands. I just assumed that it would be easy to port over to Windows, but none of the Windows emulators will execute the script, which works fine on OS X.
I'm looking for a standalone bash environment that will run my script and point the appropriate commands to the right executables. All of the programs have been ported to windows.
I'd greatly appreciate any help with this problem.
For further readers of the post who have the same question:
Don't be ridiculous, make a script for Windows cmd (*.bat) file.
For further readers of the post who have the same question:
Don't be ridiculous, make a script for Windows cmd (*.bat) file.
That would require that cygwin be installed on the friend's computer, or the commands would return an error. You can't call grep from the windows command line. You can create all the *.bat files you want, but the programs they call need to be accessible. That was my problem - windows doesn't have a good set of command line tools available.
What I ended up doing was extracting the programs that I needed from cygwin and GNU and the libraries those programs required. Everything was put into a zip file. My friend extracted the zip file into a folder, and ran the *.bat file.
That would require that cygwin be installed on the friend's computer, or the commands would return an error. You can't call grep from the windows command line. You can create all the *.bat files you want, but the programs they call need to be accessible. That was my problem - windows doesn't have a good set of command line tools available.
What I ended up doing was extracting the programs that I needed from cygwin and GNU and the libraries those programs required. Everything was put into a zip file. My friend extracted the zip file into a folder, and ran the *.bat file.
It was not an elegant solution, but it worked.
I think what he is suggesting is forget bash and use the native mswindows type batch files. I am not sure whether kde4 for windows will let you use bash also. Something to consider.
I hope this is the right forum for this topic...it didn't really seem to fit in any of the others.
Basic Question:
Is there an easy way to run simple bash scripts calling only a few commands on Windows without installing a full emulator?
Details:
I have a bash script that is designed to help a friend with a Windows computer issue. It is one line long, and only calls a few linux commands. (So I don't need to be able to call awk, grep, ls, rm, etc.) Since I don't have physical access to the computer, it would be too complicated to boot into a live cd, or install something like cygwin--I'm looking for something simple for the end user. (Something that I can load up into a folder and have a single "Click here" batch file that does everything.) I've tried UnixUtils, but that didn't work with my script. All the script does is call the find command and format the output through sed and a few other commands. I just assumed that it would be easy to port over to Windows, but none of the Windows emulators will execute the script, which works fine on OS X.
I'm looking for a standalone bash environment that will run my script and point the appropriate commands to the right executables. All of the programs have been ported to windows.
I'd greatly appreciate any help with this problem.
Have you at least tried to do a google search?
For example I have found this: win-bash
Moved: This thread is more suitable in <GENERAL> and has been moved accordingly to help your thread/question get the exposure it deserves.
And that said: Dear OP, I think you're suffering a bit of a misconception.
bash is a glue, a way of "binding programs together". Installing anything
bash-like won't cut the cheese. And short of installing cygwin including
all the programs your bash-script uses (not that I know what you're actually
making use of) it's not going to fly.
I like to bash windows all the time.
(Just couldn't resist :P)
Hmm, so you don't need Bash for anything else then fixing a computer once? I thought windows xp and beyond included a remote desktop thingy. Perhaps if you guided him to activate it, you could do what the script does manually?
Yeah get MSYS. I used to run MinGW and MSYS on Windows XP and it pretty much acted like a bash shell. http://www.mingw.org/
Oh yeah I actually made a tutorial. Maybe it is terrible, I don't know. I mostly just make the tutorials for when I forget how to do stuff months later and I don't want to relearn it. http://www.icecubeflower.com/mingw.html
Last edited by icecubeflower; 11-28-2009 at 11:01 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.