This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symlinks to scripts not found in path


On Apr 10 15:51, KARR, DAVID wrote:
> On my old 32-bit Win7 box running Cygwin 1.7.26, I have an executable script that is intended to be symlinked to and executed as the symlink name.  This works fine.
> 
> On my new 64-bit Win7 box running Cygwin 1.7.29, I created the symlink using "ln -s" as before.  When I try to execute the script through the symlink, it fails to find it in the path.  The script itself has the rx bits set.  I can execute the script directly, although it doesn't do anything useful.
> 
> I didn't see anything obvious in the FAQ or obvious searches.

Works fine for me:

  $  uname -rsm
  CYGWIN_NT-6.3 1.7.29(0.272/5/3) x86_64
  $ mkdir a b
  $ cd a
  cat > x.sh <<EOF
  #!/bin/bash
  echo Hello World
  EOF
  $ chmod +x x.sh
  $ cd ../b
  $ ln -s ../a/x.sh hello
  $ ./hello
  Hello World

Did you miss the #! by any chance?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpmHfSRG8ELD.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]