LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Expect cannot find commands (http://www.linuxquestions.org/questions/linux-from-scratch-13/expect-cannot-find-commands-657466/)

feilb 07-22-2008 12:59 PM

Expect cannot find commands
 
So, after i have chrooted into /mnt/lfs and am installing binutils, there is a test asking to check whether ptys are set up correctly using

Code:

expect -c "spawn ls"
This fails not because there are no available ptys, but because expect cannot find ls.

LS is in /tools/bin, which is in $PATH

I can execute this correctly by typing:

Code:

expect -c "spawn /tools/bin/ls"
Where is my mistake?

Mr. C. 07-22-2008 02:37 PM

How have you verified the PATH that expect actually sees?

feilb 07-22-2008 03:00 PM

Yeah, so it turns out that i forgot to export PATH. PATH looked fine when i did echo $PATH, but it was not available to everything else.

Lesson learned: don't use echo to test environment variables


All times are GMT -5. The time now is 10:56 AM.