Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am in the home directory and i have a file called s0.scm. I cannot copy it to the folder i want since i do not have root capabilities. So, here is what i want to do. In the home directory, i run the following command:

cd /usr/local/bin

Now i am in this directory. This directory has a program called scheme, and i want to open s0.scm using scheme. I s0.scm was in the same directory with scheme, (/usr/local/bin) then i could have simply written

(load "s0.scm")

to run it. But since s0.scm is in home directory, i do not know how to do this. Can anyone help me with it?

Thank you

share|improve this question

migrated from stackoverflow.com Apr 28 '13 at 1:48

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 4 down vote accepted

Try:

$ cd ~
$ /usr/local/bin/scheme
Welcome to Scheme
> (load "s0.scm")

Generally you will want to use the PATH environment variable to easily access programs. Do

$ PATH=${PATH}:/usr/local/bin

and then simply

$ scheme

to start Scheme.

share|improve this answer
1  
Thank you very much! –  bigO Apr 27 '13 at 23:12

In addition, you could also run

(load "~/so.scm")

because ~ means your home directory.

In general, if you want to load a file located in directory d, you can run:

(load "path/to/d/file.scm")
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.