in reply to Re: Replace an asterisk '*" with the content of array
in thread Replace an asterisk '*" with the content of array
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Replace an asterisk '*" with the content of array
by poj (Abbot) on Sep 18, 2015 at 11:21 UTC | |
|
Re^3: Replace an asterisk '*" with the content of array
by Anonymous Monk on Sep 18, 2015 at 10:44 UTC | |
|
Re^3: Replace an asterisk '*" with the content of array
by Anonymous Monk on Sep 18, 2015 at 10:50 UTC | |
by Anonymous Monk on Sep 18, 2015 at 11:01 UTC | |
by deep27ak (Novice) on Sep 19, 2015 at 05:54 UTC |