2 articles tagged "fi"
- BASH shell scripting tip: Set default values for variable
A shell variable may be assigned to by a statement using following syntax:
var=value
If value is not given, the variable is assigned the null string. In shell program it is quite useful to provide default value for variables. For example consider rsync.sh script:
#!/bin/bash
RSRC=$1
LOCAL=$2
rsync -avz -e ’ssh ‘ user@myserver:$RSRC $LOCALThis script can be run as follows:
$ ./rsync.sh [...] - Check out cool Firefox ad
See all Firefox ads here
Direct link Woot!
Viewing 1-2 of 2 posts. ( see all popular tags )


Recent Comments
Today ~ 176 Comments
Today ~ 4 Comments
08/24/2006 01:56 pm ~ 11 Comments
Today ~ 4 Comments
Today ~ 5 Comments