I have the following script. It's a simple test case where a
is any string value and b
is supposed to be a path.
#!/bin/bash
alias jo "
echo "please enter values "
read a
read -e b
echo "My values are $a and $b""
However whenever I try to execute ./sample.sh I get the following errors:
./sample.sh: line 3: alias: jo: not found
./sample.sh: line 3: alias: echo please: not found
./sample.sh: line 3: alias: enter: not found
./sample.sh: line 3: alias: values: not found
./sample.sh: line 3: alias: read a read -e b echo My: not found
./sample.sh: line 3: alias: values: not found
./sample.sh: line 3: alias: are: not found
./sample.sh: line 3: alias: and: not found
./sample.sh: line 3: alias: : not found
and when I try source sample.sh
I get the following:
a: Undefined variable.
My aim was to make this an alias so that I can source this script and just run the alias to execute the line of commands. Can someone look at this and let me know what the error is?