
01-03-2009
|
|
Shell programmer, author
|
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
|
|
Quote:
Originally Posted by em23
Hey all, I was wondering if someone would take a look at this script I'm working on. I don't know if i have the syntax correct for my variables and if the for loop is written correctly.
|
Did you run the script? If you did you would have received error messages telling you what and where the errors were.
Quote:
|
any assistance would be greatly appreciated.
|
When posting code, please put it in [code] tags.
Quote:
Code:
if [[ -e $DMI_FILE ]]; then #check to see if the file exists
|
[[ -e ... ]] is not standard and, in this case, offers nothing over the standard [ -e ... ].
Quote:
Code:
for conf in $($DMI_FILE)
|
There's an obvious mistake. Why are you using command substitution when the variable does not contain a command?
|