My If else statement only enters the first one?
Code:
#!/bin/bash |
If you run the script as 'bash -vx /path/to/script.sh' you can see all variables filled in etc, etc. Also note there's no need for nesting so:
Code:
if [ "$1" = "A" ]; then Code:
case "$1" in Code:
function help() { echo "Bash scripting guides: |
Quote:
It's not some kind of C-like expression, "[" is a command. You can put any other command after it, too. The "[" command is basically the test command, but it requires the last argument to be "]". Read man test for more info. http://mywiki.wooledge.org/BashPitfa..._.3D_d_.5D_.5D |
All times are GMT -5. The time now is 04:18 AM. |