LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-22-2008, 11:59 AM   #1
feilb
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
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?
 
Old 07-22-2008, 01:37 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
How have you verified the PATH that expect actually sees?
 
Old 07-22-2008, 02:00 PM   #3
feilb
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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

Last edited by feilb; 07-22-2008 at 04:49 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Piping find or ls with rm commands hugene Linux - Newbie 3 05-01-2008 10:19 AM
find commands shawniecas Linux - Newbie 4 06-14-2007 11:25 AM
find and delte commands gothicbob Linux - Newbie 6 03-14-2007 01:43 PM
find & rm commands O(V)eGA_l2el) Linux - Newbie 6 08-26-2006 08:16 AM
Automae telnet log in and execute commands (expect and send) rajatgarg Linux - Networking 0 06-24-2004 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration