There is a binary in my home directory: "foo"
My PATH variable doesn't contains my home dir.
I cannot change my PATH varible, since it's read-only
Question: How can I execute this binary without using the following:
./foo
. ./foo
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThere is a binary in my home directory: "foo"
My PATH variable doesn't contains my home dir.
I cannot change my PATH varible, since it's read-only
Question: How can I execute this binary without using the following:
./foo
. ./foo
Try this:
create a parse.sh file with content:
#!/bin/bash
export PATH=$PATH:./
foo
execute with bash --noprofile --norc parse.sh
~/foo
? – mattdm May 6 '15 at 19:35bash foo
doesn't have a slash in it after all... – Jan May 6 '15 at 19:47