On Apr 9, 9:28 am, LFM <
laur...@gmail.com> wrote:
> Thanks for your reply Keith.
> I got it to work, it was a matter of making my script executable, I
> guess that is the advantage of working from a USB. The echo$PATH
> command still says that there is no such file or directory, but I
> guess is referring to one of the other directories listed, because I
> definitively have a Code directory in there (s -l /home/lfm/Documents/
> Unix_and_Perl/Code outputs my files in the Code directory correctly).
> I am now on the Perl section of the course, and I find myself setting
> chmod u+x for each single script I create, is there an easier way of
> doing it?
There is a way of making any new file have a default set of
permissions that you specify. However, it would be dangerous to do
this. You don't want to treat every file as a program and there may be
times when you want a program of yours to be run by others in your
Unix group (e.g. chmod g+x) or even everyone else on your system
(chmod o+x). It's something you do once per script which is a small
cost to pay. And if you are starting on several scripts at once, you
can change the permissions on them all in one go:
chmod u+z *.pl
Regards,
Keith