Hi there,
I want to write a rc script. My rc.conf should hold information for it in following format:
Now I want something like this in my rc start script to find out about all "md_file_md" related variables:
Obviuosly I could write something by the help of sed / awk to filter for md0, md1, md2, md[n] in rc.conf file ... but I was hoping the rc framework has somthing like this already? Or is there any better ideas of how to solve this easier?
Thanks
I want to write a rc script. My rc.conf should hold information for it in following format:
Code:
md_enable="YES"
md_file_md0="/path/to/file-0"
md_file_md1="/path/to/file-1"
md_file_md2="/path/to/file-2"
Now I want something like this in my rc start script to find out about all "md_file_md" related variables:
Code:
for FILE in $md_file_md*; do
echo $FILE
done
Obviuosly I could write something by the help of sed / awk to filter for md0, md1, md2, md[n] in rc.conf file ... but I was hoping the rc framework has somthing like this already? Or is there any better ideas of how to solve this easier?
Thanks