Reputation: 11
I'm trying to curl the script:
#!/bin/ash
echo "Text Prompt: "
read REPLY
echo $REPLY
However, I get this output:
Text Prompt:
: bad variable name
When I run the command from the terminal, it works fine. I've also tried the following with similar results:
#!/bin/ash
read -p "Text Prompt: " vName=$REPLY
echo vName
#!/bin/ash
read -p "Text Prompt: " && vName=$REPLY
echo vName
Upvotes: 1
Views: 1689
Reputation: 11
I was editing in notepad++, which adds windows-specific newline characters onto the end of the line. Tried doing it in sublime and it worked immediately.
Upvotes: 0