I am running a stripped down version of BSD Unix V6, bkunix on my Elektronika BK 0010-01. It has a very limited range of Unix commands. The contents of /bin are:
- cal
- cat
- clock
- cp
- date
- df
- echo
- ed
- halt
- ln
- ls
- mkdir
- mount
- mv
- od
- pwd
- rm
- rmdir
- sh
- stty
- sync
- umount
- wc
and the contents of /etc are:
- fsck
- glob
- init
- mkfs
- mknod
There are also some shell built-ins like cd (though errors mention chdir, as per V6).
So, I am trying to run this shell script called hw using sh:
#!/bin/sh
echo "Hello, world!"
If I type
#./hw
I get the error message "./hw: not found"
If I type
sh hw
(or sh hw.sh
- I tried this too), I get "try again".
I am guessing it is because the shell script is not executable, though unfortunately I do not know how to make it executable, as chmod is not implemented. The system appears to be aware of permissions, as you can see them when you run ls -l.
So my question are: Is "try again" probably connected to missing permissions, and if so, how might I change file permissions with only the shell builtins and the utilities listed above?
"
. Possibly the Amstrad PC1512.