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

Re: Make with a prompt



On Thu, 24 Mar 2005 16:38:46 -0600, NZG <ngustavson@emacinc.com> wrote:
> I'm trying to get a makefile to prompt a user for a value.
> The normal bash syntex doesn't work
> i.e
> 
> example:
>  read value
>  use $value for something
> 
> It prompts the user, but I don't know where it's putting value
> 
> echo $value returns nothing
> echo $$value returns $value
> 
> Does anyone know how to do this?
> 
> thx,
> NZG.
> 

are you using the actual word "value"?  Maybe it's a reserved word. 
Have you tried other variable names?

I googled bash input for a quick refresh and found this:

#! /bin/bash
echo -n "Pick a screen color (blue, yellow, red ): "
read -e COLOR
setterm -background $COLOR
echo It is a $COLOR day

I'm not sure what the "-e does" but try this script to see what it
gets ya if the varaible suggestion above does nothing.

GS

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.