$ who am i
cyborg ttyp3 Nov 25 12:40
$ id
uid=200(cyborg) gid=100(cyborg)
groups=100(cyborg),50(group),102(cybdev)
$ pwd
/u3/cyborg45/bin
$ l runonline
-rwx--x--x 1 cyborg45 cyborg 211 Nov 24 09:34 runonline
$ type runonline
runonline is hashed (./runonline)
$ runonline
/bin/ksh: ./runonline: cannot open
$
Why won't it run the script runonline?
Many thanks in advance!
--
Richard Tibbetts
http://www.primepeace.ltd.uk/
wild guess, you are not the script owner, just a group member ... group
has execute but not read permisions .. try chmod 755 ing it ..
(assuming that that is what ksh is trying to say here .. I am only
familiar with bash) certainly with perl they wont run in execute only
you need read as well ... depends whats in the script I guess
ps is this cyborg as in the cobolesque pyroll thing or something else?
r.
I did wonder about that - I'll give it a try!
>
>ps is this cyborg as in the cobolesque pyroll thing or something else?
>
>r.
Well spotted! Were have you come across it? (It's my thang, as they
say, as you'll see from my web page;-))
One possibility is if you've transferred it from a Windoze/DOS box it has ^M on the
end of each line. That tends to screw scripts up a treat.
-- ----------------------------------------------------------------------------
| Why can't men get Mad Cow disease? |
| Virtual Environment Resource Group Enterprise |
| < mailto:Ru...@verge.demon.co.uk > |
| < http://www.verge.demon.co.uk/index.htm > |
| 'Cause all men are PIGS! (ex-)girlfriend |
-------------------------------------------------------------------------------
> >
> >ps is this cyborg as in the cobolesque pyroll thing or something else?
> >
> >r.
>
> Well spotted! Were have you come across it? (It's my thang, as they
> say, as you'll see from my web page;-))
a mate of mine is Cyborg contractor ... its a funny old thing innit, but
seems theres still enough $BIGCORP using it and too few people with clue
to maintain it...
--
robin
n...@rszemeti.demon.co.uk but replace ng with my name
I _really_ hate spam .....
No, it's fine if I run it from a different user. I'm pretty sure the
problem is due to the lack of read permission. I've been told that
SCO needs this to execute the script - I'll check this tomorrow.
>>>$ who am i
>>>cyborg ttyp3 Nov 25 12:40
>>>$ id
>>>uid=200(cyborg) gid=100(cyborg)
>>>groups=100(cyborg),50(group),102(cybdev)
>>>$ pwd
>>>/u3/cyborg45/bin
>>>$ l runonline
>>>-rwx--x--x 1 cyborg45 cyborg 211 Nov 24 09:34 runonline
>>>$ type runonline
>>>runonline is hashed (./runonline)
>>>$ runonline
>>>/bin/ksh: ./runonline: cannot open
>>>$
>>>
>>>Why won't it run the script runonline?
>>>
Shell scripts need read & execute to work. After all, what happens
is that ksh (or bash or whatever) starts up (#!/bin/ksh) and then
attempts to read in the rest of the script as it's stdin.
No read permission, so it blows. Compiled executables don't
suffer from this, but all scripted languages do. 755 or 750 or 700
would be normal permissions for scripts.
Matt
Don't you just hate that.
The pure simple blindingly obvious taken for granted logical reason that
just never makes it past the tip of the tongue.
It's one of the things I like about *nix, if you sit down and look the
answer is usually starring back at you.
>In article <8vs79h$704$1...@thor.our.house>, Matt Foster
><ma...@molnir.demon.co.uk> writes
>>Shell scripts need read & execute to work. After all, what happens
>>is that ksh (or bash or whatever) starts up (#!/bin/ksh) and then
>>attempts to read in the rest of the script as it's stdin.
>>No read permission, so it blows. Compiled executables don't
>>suffer from this, but all scripted languages do. 755 or 750 or 700
>>would be normal permissions for scripts.
>
>Don't you just hate that.
>The pure simple blindingly obvious taken for granted logical reason that
>just never makes it past the tip of the tongue.
>
>It's one of the things I like about *nix, if you sit down and look the
>answer is usually starring back at you.
That's what makes it such a love-hate relationship I suppose.
Thanks to all who responded. The permissions *were* wrong, however
(predictably) there were/are other problems too!