cancel
Showing results for 
Search instead for 
Did you mean: 

cygwin on windows help

SOLVED
Go to solution
Palanikumar
Occasional Contributor

cygwin on windows help

Hi,

I have installed cygwin on windows to execute shell script to connect
my HPUX servers.
I need to know the editor available for the writing the Shell scripts
and the path for the shell(example : #!/bin/ksh) that needs to be
mentioned in the shell scirpt.

If this is not the right forum, please direct me to the right.

Thanks

Regards
PK
10 REPLIES
Palanikumar
Occasional Contributor

Re: cygwin on windows help

Forgot to mention ...
Easy points up for grabs !!!

-PK
Hein van den Heuvel
Honored Contributor

Re: cygwin on windows help

Best I know it is 'bash'. Just do a 'man sh'

Also, echo $SHELL returns: /bin/bash

I don't think you need to mention it in you cygwin shell scripts.

fwiw,
Hein.

Sreedharamurthy K
Respected Contributor

Re: cygwin on windows help

within a cygwin shell, a regular 'which ksh' should work as normally as on a *NIX system. Try that comand. Whatever that returns you can use that in the script.

IT is usually in /usr/bin or /bin (sometimes it will be a link to /usr/bin).
Court Campbell
Honored Contributor
Solution

Re: cygwin on windows help

cygwin typically uses bash as the default shell. You should use #!/bin/bash. You could use vim as your editor. and actually since you are on a windows machine you could also use notepad. unless you set it up differently the root directory for cygwin is c:\cygwin.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Armin Kunaschik
Esteemed Contributor

Re: cygwin on windows help

I remember that ksh (pdksh) is not installed by default.
Remember to install vim too for a full featured vi version!

Armin
And now for something completely different...
Court Campbell
Honored Contributor

Re: cygwin on windows help

just checked and bash is located at /usr/bin/bash. I also updated my install and added pdksh which is located at /usr/bin/pdksh.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Palanikumar
Occasional Contributor

Re: cygwin on windows help

:o that was a great help ..!!


Thank you very much!!

Its working fine :D
Court Campbell
Honored Contributor

Re: cygwin on windows help

Just to mention, cygwin is also great for setting up the ability to ssh to your windows machine and for setting up nfs on windows. Here are some good howtos:

SSH howto:
http://pigtail.net/LRP/printsrv/cygwin-sshd.html

NFS Howto:
http://www.csparks.com/CygwinNFS/index.xhtml

Anyway, I thought you might find those interesting. It's nice to be able to scp files from my hp-ux boxes to my windows laptop.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Palanikumar
Occasional Contributor

Re: cygwin on windows help

Hi Court & others,

Thank you very much for your valuable time and suggestions, It worked well with me.

Thanks Again.

PKs
Palanikumar
Occasional Contributor

Re: cygwin on windows help

Problem solved and knowledge gained :)

Thanks,
PK