On 8/28/07, t0nedef <[EMAIL PROTECTED]> wrote: > > Ok, i wrote this script to help with wpa wireless connections, but for some > reason, it errors out. It says that the ESSID is empty. I've double checked > my syntax, and it looks right to me. *yes, i did double check the syntax for > the read command*
It would be nice to have the real error message > well heres the code: > > #!/bin/bash( (...) > ROOT_UID=0 > WORK_PATH=/etc/wpa_helper # Storage directory DO NOT MODIFY > WORK_FILE=$WORKPATH/$ESSID.conf # Configuration file DO NOT MODIFY ESSID is not set at this point WORK_FILE will always contain /etc/wpa_helper/.conf It will not be updated dynamically with the current value of workpath and essid during the expansion of $WORK_FILE as you seem to expect. set -x helps you to see what's going on for more tips on debugging see: * http://bash-hackers.org/wiki/doku.php?id=scripting:debuggingtips It can be a good idea to quote all your parameter expansions: "$VAR" see: * http://wooledge.org/mywiki/BashPitfalls