Help with U28 and 29 please!

12 views
Skip to first unread message

Joyce Wang

unread,
Oct 21, 2013, 3:24:04 AM10/21/13
to unix-and-perl-...@googlegroups.com, Joyce Wang
Hello! 
Thanks for this wonderful tutorial and sorry for the newbie questions...

I am using Mac Terminal (OSX 10.8.5). I am having problems with U28 and 29:
- no problem seeing .profile using ls -a and less. However, source .profile doesn't generate anything - is something supposed to happen?
- have already gone into nano profile to fix the location of my HOME.

- could use source hello.sh to get Hello World, but my problem is that when I moved it up one directory, it still worked!!!
The manual says it shouldn't...
Interestingly, when I typed ./hello.sh, the following message popped up:
-bash: ./hello.sh: Permission denied

Can anyone help, please?

Thanks
Joyce

Keith Bradnam

unread,
Oct 21, 2013, 11:21:48 AM10/21/13
to unix-and-perl-...@googlegroups.com, Joyce Wang
Try the following:

  1. Close your terminal
  2. Open new terminal window
  3. type echo $PATH and note the results
  4. Run your source command as before
  5. Repeat step 3
Unless your .profile file contains any instructions to print any text, you will not see any obvious effects of running the source command. But it should be making changes in the background (in particular, it should be modifying the contents of the $PATH environment variable).

To confirm...you are not running this course from a USB drive but from your Mac?

Regards,

Keith

Joyce Wang

unread,
Oct 21, 2013, 5:49:29 PM10/21/13
to unix-and-perl-...@googlegroups.com, Joyce Wang
Dear Keith, thank you for the response.

I am working on my Mac indeed, not on USB.
I followed your instruction -

Last login: Mon Oct 21 17:36:20 on ttys000
Behrs-MacBook-Pro:~ Behr$ cd unix_and_perl_course
Behrs-MacBook-Pro:unix_and_perl_course Behr$ echo $path

Behrs-MacBook-Pro:unix_and_perl_course Behr$ source .profile
Behrs-MacBook-Pro:~ Behr$ echo $path

Behrs-MacBook-Pro:~ Behr$ source .profile

Is this what's supposed to happen?

And I still have a problem with my hello.sh file...
ie. it runs fine when I'm in "code", but once I move it up to unix_and_perl_course, I can still source hello.sh and get Hello World. ./hello.sh gives me No such file or directory.

If you have any suggestions please let me know.

Thanks
Joyce

Keith Bradnam

unread,
Oct 21, 2013, 6:57:35 PM10/21/13
to unix-and-perl-...@googlegroups.com, Joyce Wang
And the .profile file is definitely there (i.e. you see it when you do ls -a?). Can you run:

cat .profile

and paste the output.

Jessilyn Dunn

unread,
Jun 26, 2014, 11:29:19 AM6/26/14
to unix-and-perl-...@googlegroups.com
Hi,
Thank you for this great tutorial! I'm having the same problem as Joyce. The hello.sh script works fine from any directory I am in, as long as I type source hello.sh. However if I just type hello.sh, I get this error: zsh: permission denied: hello.sh

I double checked that my .profile file is correct with the location where I stored the course files and used the $PATH to double check. Is there something else that I need to change? For more info, I am running this in virtualbox using BioLinux, and I have saved the course files under /home/manager/Downloads/Unix_and_Perl_course

Thank you very much!
Jessie

Keith Bradnam

unread,
Jun 26, 2014, 11:58:12 AM6/26/14
to unix-and-perl-...@googlegroups.com
Hi Jessie,

The issue might be that you seem to be using zsh as your default shell rather than bash. Rather than use a .profile file, zsh shells use a .zprofile file. More info here:


Regards,

Keith
Reply all
Reply to author
Forward
0 new messages