Help required for these commands

Hi,

I was going through some environment scripts where I require to make some changes. There are a couple of commands I cant understand at all.

1:- SIDS=${*:-}

2:- for element in detail.func common1.func status.func stop_start.func mc.global log.func
under the for loop $element has been used.
detail.func, common1.func etc are some files that have been included at the start of the script and mostly contains a list of functions defined.
One of these scripts contain
"fn_status_NET8 () { fn_status_ALL ; }
fn_status_DB () { fn_status_ALL ; }
fn_status_GTWY () { fn_status_ALL ; }

fn_status_ALL () {
unset STATUS
fn_detail_${OBJECT} >/dev/null 2 >&1
mc_display "Env $ORACLE_SID - Service $OBJECT - Status $STATUS"
}"
which I cant understand either.

It would be a great help if anyone can explain me the three things.
Thanks a million in advance

${variable:-default} returns the value of $variable, or if it's unset or empty, the text "default". So SIDS=${:-} sets SIDS to the value of $, or to "-" if it's unset.

for var in list of words; do ... done assigns to var each of the elements list, of, and words in turn, and executes the body of the loop. So in your example element is set to detail.func up until the corresponding done, then the same code is repeated with element set to common1.func, then status.func, then mc.global, then log.func. Judging from the names, these are file names containing function declarations, which are probably imported to be used by the script.

func () { body; } declares a function func whose contents are the commands in body so basically the fn_status_* functions are all declared as fn_status_ALL which in turn invokes fn_detail_$OBJECT and mc_display (it's not clear from the code you posted what $OBJECT is set to).