how to run shell script

Igor Peshansky pechtcha@cs.nyu.edu
Wed Apr 25 16:56:00 GMT 2007


On Mon, 23 Apr 2007, Dave Korn wrote:

> On 23 April 2007 10:42, sg wrote:
>
> > hi friends,,
> >
> > how to run shell script on cygwin in windows..
>
>   chmod a+x ./script-name
>   ./script-name
>
> i.e. it has to have the executable bit set, and you need to specify the
> current directory as part of the path if you haven't got the current
> directory in your $PATH (which you probably don't, and probably
> shouldn't).

...Unless the trailing "on windows" really means "from a windows command
prompt", in which case the proper way to do this is "c:/cygwin/bin/bash -l
-c ./script-name" (or pick your favorite shell with the appropriate
options).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list