1

I was trying to run a script to set my Oracle environment in RHEL. I ran it as ./foo.env, but it wouldn't run because of a permissions issue. I then ran it as . ./foo.env, and it ran successfully. What's the difference between the two, exactly?

1 Answer 1

1

Running ./foo.env means you're trying to execute the file as a shell script. Running a file as a shell script means that the file must have executable permission for your account. Running . ./foo.env is the equivalent of source ./foo.env, which means you only need to have read permission to the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .