[PLUG] Collect input via bash?

Russell Evans revans at e-z.net
Sat Aug 31 20:16:31 UTC 2002


I like to use read with the -p option instead of echo. 

while true ; do
	read -p "Please input your name: " NAME
	if [ ${#NAME} != 0 ] ; then 
		echo "Thank you, your name will be $NAME" 
		break  
	fi
done


Thank you
Russell


On Sat, 31 Aug 2002 10:14:28 -0700 (PDT), David Fleck said:


>  
>  #!/bin/sh
>  
>  echo "your name: "
>  read name
>  
>  echo "number of apples: "
>  read apples
>  
>  echo "number of oranges: "
>  read oranges
>  
>  echo "$name $apples $oranges"
>  






More information about the PLUG mailing list