mrkiwi wrote:
> I am trying to write the code for this psudo code;
> 
> function askYN{
>     echo "continue?"
>     read the response into $response
> }

Can you show your actual askYN function?  You also need to screen all
user input for validity.

> This is what i have so far, but it complains (i think) because of the
> parameters passed into askYN. 
> I think i need to somehow bracket them
> 
> if [ askYN "Blah" -eq 0 ] && [ $response == "yes" ]

The if statement takes a command.  You want to call the command.
Don't put it through the [...] test wrapper.

  if ! askYN "Blah"; then
    if [ _"$response" = _"yes" ]; then

This reference might be useful to you.

  http://tldp.org/LDP/abs/html/

Bob


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to