We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,018 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

shell script

hi all
i want to write unix shell script but my operating system is windows 7 so do you have or know a program that provide unix environment on windows???
thanks in advance

4
Contributors
4
Replies
1 Day
Discussion Span
5 Months Ago
Last Updated
6
Views
lena1990
Junior Poster
123 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
dancie reeves
Newbie Poster
3 posts since May 2008
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

i try it but when it is download an error is displayed bin/bash directory is not exist

lena1990
Junior Poster
123 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Get Virtual Box. Install it.
Get an ISO of a linux distro of your choice (i.e. linux mint, ubuntu server)
Create a new virtual machine within virtual box, mount the ISO to the virtual machine (in settings), and boot the virtual machine.

Write away.

CimmerianX
Posting Pro in Training
499 posts since Jul 2010
Reputation Points: 49
Solved Threads: 59
Skill Endorsements: 10

Cygwin is basically what you want. It is exactly that, a unix-like terminal for Windows. It isn't perfect (but nearly so), and might give you a bit of trouble here and there, mostly if you didn't install the packages (in the manual install configurations) that you needed (and, as a beginner, you might not know what you need, so it's a bit of a catch 22). Cygwin is like a Linux-in-a-box program with a very rich set of packages that you can install (using their "setup.exe" program), almost as rich as some basic Linux distributions. With those packages, you can basically get just about every unix tool (including "bash", and much more), or more precisely, the GNU toolset (GNU implementations of classic Unix tools and more, as in "GNU/Linux" which means GNU-toolset + Linux-kernel, well, cygwin just replaces the "Linux-kernel" with "Windows-wrapped-in-a-POSIX-API"). Remember, the Unix "style" is that the overall system is composed of thousands of small programs (tools) each with a very specific task.

Anyway, if you had an error saying that "bin/bash" didn't exist, try checking the list of installed packages and make sure all "bash" related packages are installed ("bash" is not one of the default/minimal-install packages). In general, a package-rich install of cygwin should be able to meet all your unix shell scripting needs and much more.

Another option is, of course, to get Linux either in a virtual box (VirtualBox or VMWare), or as a dual-boot (a bit more of a commitment), or just trying it out with a live USB-key distribution. The virtual box option is the easiest and most convenient for casual use and to just play around with Linux distros and unix shell scripting. This will be less trouble to use than cygwin, but it is also heavier (on the system) and does create a fairly isolated environment that doesn't blend at all with the Windows environment. So, this might be a better solution if what you want is a sandbox in which to play with unix shell and with Linux. All my windows machines have a fairly package-rich cygwin installed on them, as it is the only decent and powerful command-line tool for working on the Windows system (not playing in a sandbox), so if that's your intended purpose, cygwin is what you need.

mike_2000_17
21st Century Viking
Moderator
3,136 posts since Jul 2010
Reputation Points: 2,050
Solved Threads: 625
Skill Endorsements: 41

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0912 seconds using 2.69MB