- LinuxShell no LinuxShell ScriptExpansões, Aspas e Aritmética em Shell Script
- LinuxShell no LinuxShell ScriptFunções em Shell Script
Considere o seguinte shell script para bash:
#!/bin/bash
f1() {
a=$(($1+$2*$3))
echo "$a"
}
f1 6 5 4
A saída de sua execução no terminal é: