Operating System - HP-UX
1834089 Members
2358 Online
110063 Solutions
New Discussion

Re: Why doesn't it work when I issued the command: sh dir

 
May_3
Advisor

Why doesn't it work when I issued the command: sh dir

 
May
5 REPLIES 5
Tom Geudens
Honored Contributor

Re: Why doesn't it work when I issued the command: sh dir

Hi,
Because there is no such command ... as far as I can see there are a couple of c header files available (#man dir) but there is no actual command / executable.

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Printaporn_1
Esteemed Contributor

Re: Why doesn't it work when I issued the command: sh dir

Hi,

I guess you want to change directory
use
#cd
enjoy any little thing in my life
Pete Randall
Outstanding Contributor

Re: Why doesn't it work when I issued the command: sh dir

Hi,

Are you trying to sh the contents of the directory?
If so, cd into the directory and do:

for i in *
do
sh $i
done

HTH

Pete

Pete
Shannon Petry
Honored Contributor

Re: Why doesn't it work when I issued the command: sh dir

The command "sh dir" is attempting to execute the directory. This is not possible and the kernel wont allow you to do this.

permissions on a directory may say execute, but on directories this has a quite different meaning than a file! Bit 1 on a directory allows a change directory.

Regards,
Shannon
Microsoft. When do you want a virus today?
MANOJ SRIVASTAVA
Honored Contributor

Re: Why doesn't it work when I issued the command: sh dir

Hi May

Are you trying to excute a directory , or files under it . You cannot excute a directory. All you do
cd /directory name and excute the file or say sh /test/ in case you want execute many file then may be you can put in some loop.


Manoj Srivastava