mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
12 lines
164 B
Bash
12 lines
164 B
Bash
#!/bin/bash
|
|
# using the echo to return a value
|
|
|
|
function db1 {
|
|
read -p "Enter a value:" value
|
|
echo $[ $value*2 ]
|
|
}
|
|
|
|
result=`db1`
|
|
echo "The new value is $result"
|
|
|