Aşağıdaki komut dosyası var. aHerhangi bir dize değeri olan ve bbir yol olması gereken basit bir test durumudur .
#!/bin/bash
alias jo "\
echo "please enter values "\
read a \
read -e b \
echo "My values are $a and $b""
Ancak ./sample.sh dosyasını çalıştırmaya çalıştığımda aşağıdaki hataları alıyorum:
./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
ve denediğimde source sample.shaşağıdakileri alıyorum:
a: Undefined variable.
Amacım, bu komut dosyasını kaynaklayabilmem ve yalnızca komut satırını yürütmek için takma adı çalıştırabilmem için bu bir takma ad yapmaktı. Birisi buna bakıp hatanın ne olduğunu bana bildirebilir mi?