Tengo el siguiente código dentro de un Makefile:Makefile - ¿Por qué el comando de lectura no lee la entrada del usuario?
# Root Path
echo "What is the root directory of your webserver? Eg. ~/Server/htdocs" ;
read root_path ;
echo $root_path ;
if [ ! -d $root_path ] ; then \
echo "Error: Could not find that location!" ; exit 1 ; \
fi
Sin embargo, cuando escribir nada (. Por ejemplo, "TEA") esto es lo que se volvió:
What is the root directory of your webserver? Eg. ~/Server/htdocs
asd
oot_path
Error: Could not find that location!
Cuando lo que se esperaría para ver lo haría ser:
What is the root directory of your webserver? Eg. ~/Server/htdocs
asd
asd
Error: Could not find that location!
¿Cómo puedo arreglar esto ???
Votando para esta pregunta porque creo que probablemente aparece repetidas veces, pero vea lo que Greg, John y Daenyth dicen sobre hacer esto: * el asesinato de hacha que a continuación mantiene su código ** no ** me gustará. * – dmckee