Cheshie Cheshie - 5 years ago 262
Bash Question

Can't run shell script from other shell script

I'm trying to run a shell script that calls another shell script:


for k in `cat ../config/file1.keywords`
echo "*** keyword: $k ***"
./ $k

I got the following error:

./ Permission denied

I tried using:
chmod +x

When I ran my script again, I got a different error:

./ not found

What am I missing here...? Thanks.

(I'm running on a
ubuntu 14.04 LTS
on an
Oracle VM VirtualBox

Answer Source

have you something like #!/bin/sh in If not, use sh $kinstead of ./ $k

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download