MJD Posted May 11, 2008 Share Posted May 11, 2008 Hello *nix customization and support! I would like to write and execute bash shell scripts in Windows.. is this possible? And more specifically, I would like to use VI to do so. I have downloaded and installed Cygwin, but it comes with no VI editor.. actually, it seems to have come with almost nothing. Anyways.. any help would be much appreciated. Thanks! Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/ Share on other sites More sharing options...
MrA Posted May 11, 2008 Share Posted May 11, 2008 You can add stuff to cygwin through the installer, including vim, I think. I'd suggest to take a look at gvim if you'd like vi on windows. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589390871 Share on other sites More sharing options...
tmahmood Posted May 11, 2008 Share Posted May 11, 2008 www.vim.org << you'll find a windows version here Cygwin provides an online installer as a download not all the Linux utilities, when you execute, it downloads and install everything you want, It might have Vim built in. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589391051 Share on other sites More sharing options...
deadite66 Posted May 11, 2008 Share Posted May 11, 2008 MS powershell was designed to more unixy Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589391275 Share on other sites More sharing options...
Glowstick Posted May 11, 2008 Share Posted May 11, 2008 Powershell is as unixy as the sky is red. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589391561 Share on other sites More sharing options...
Borbus Posted May 11, 2008 Share Posted May 11, 2008 vim is cross-platform so it runs on windows natively. As for shell scripting, I would use Python which is also cross-platform and also has the advantage of being able to be compiled into an executable on windows. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589391687 Share on other sites More sharing options...
+BudMan MVC Posted May 11, 2008 MVC Share Posted May 11, 2008 MJD said: I have downloaded and installed Cygwin, but it comes with no VI editor.. actually, it seems to have come with almost nothing. Well yeah, if you do not install any packages -- its pretty bare ;)Vim is one of the available editor packages.. there are lots to choose from.. If you want to use vi, then install it. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589391743 Share on other sites More sharing options...
MJD Posted May 12, 2008 Author Share Posted May 12, 2008 Thanks guys! Yeah.. I missed that step with Cygwin when I installed.. whoops. Anyways.. seems to work great, I'm very happy, except... when I run my script it runs extremely slow.. it only utilizes 2% at most of my processor power and ends up taking 1-2 minutes to write a simple 40kb text file with only 8 lines of code. Does anyone know of a way to increase the processing power it utilizes? Thanks again for the help guys! Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589393182 Share on other sites More sharing options...
MrA Posted May 12, 2008 Share Posted May 12, 2008 MJD said: Thanks guys! Yeah.. I missed that step with Cygwin when I installed.. whoops. Anyways.. seems to work great, I'm very happy, except... when I run my script it runs extremely slow.. it only utilizes 2% at most of my processor power and ends up taking 1-2 minutes to write a simple 40kb text file with only 8 lines of code. Does anyone know of a way to increase the processing power it utilizes?Thanks again for the help guys! Generally, a program will run as fast as possible. Slowdowns are probably caused by IO waits. Do you do any network or disk interaction? If so, you'll have to look at optimizing those. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589394218 Share on other sites More sharing options...
MJD Posted May 13, 2008 Author Share Posted May 13, 2008 MrA said: Generally, a program will run as fast as possible. Slowdowns are probably caused by IO waits. Do you do any network or disk interaction? If so, you'll have to look at optimizing those. Hmm.. its just a script that reads a field from a txt file and then appends that field with a little additional text to another text file. It loops about 1000-2000 times but still... I have a E8400 with 8GB RAM.. Oh well.. I suppose I'll have to try it on an actual linux installation to see if there is a difference. Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589396326 Share on other sites More sharing options...
Borbus Posted May 13, 2008 Share Posted May 13, 2008 Like I already said, why are you using cygwin for such a task when there is a perfectly good and native solution: Python (or perl). And vim runs natively on windows too. So don't use cygwin... Link to comment https://www.neowin.net/forum/topic/636231-bash-shell-scripting-in-windows/#findComment-589396334 Share on other sites More sharing options...
Recommended Posts