bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with script --


From: Pierre Gaston
Subject: Re: Help with script --
Date: Tue, 28 Aug 2007 09:24:06 +0300

On 8/28/07, t0nedef <t0nedef@haktstudios.com> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]