This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

problem with exec - [SOLVED]

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

problem with exec - [SOLVED]

Post by SaPrOuZy »

hi guys,
does anyone know when we use exec in which path it's considered?

to be clearer:
i have the following shell script:

Code: Select all

#!/bin/sh
rm -f somePage.txt
wget --user-agent='"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"' -k  -K -e robots=off  -O ~/eggdrop/scripts/somePage.txt www.somepage.com
if i execute this script from the shell, it works
when i use exec and run it from the bot, i get
Tcl error [dl_page]: wget: not found
any idea why?

thanks.
Last edited by SaPrOuZy on Mon Jun 19, 2006 4:02 pm, edited 1 time in total.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

my guess is that eggdrop sees another enviroment PATH. You can check it within the bot as 'set env(PATH)' and on sh/bash via 'export | grep PATH'. Alternately just use full paths :).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

thx, i used wget's full path /usr/local/bin in my case.
works great :D
Post Reply