I cannot hardcode the @finalnwlist value as I said it will vary on different machine. This gets input from xml file.
nor I can hardcode @lines with exports permission as you have done here.
The script should check each line replace '*' with each of the subnet value and should do the same for all the subnets for all the shares
The output should be like/file1 192.169.32.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_ch +eck) /file1 192.169.72.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_ch +eck) /file1 192.169.73.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_ch +eck) /file2 192.169.32.0/255.255.255.0(ro,sync,no_root_squash,no_subtree_ch +eck) /file2 192.169.72.0/255.255.255.0(ro,sync,no_root_squash,no_subtree_ch +eck) /file3 192.169.73.0/255.255.255.0(ro,sync,no_root_squash,no_subtree_ch +eck) # shares for Tsp InstallServer file3 192.169.32.0/255.255.255.0(ro,sync,no_subtree_check) file3 192.169.72.0/255.255.255.0(ro,sync,no_subtree_check) file3 192.169.73.0/255.255.255.0(ro,sync,no_subtree_check)
In reply to Re^2: Replace an asterisk '*" with the content of array
by deep27ak
in thread Replace an asterisk '*" with the content of array
by deep27ak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |