Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DC:D3:21:75:61:90 ; 10.25.131.17
- ;
- Host 27-48 { hardware ethernet DC:D3:21:75:61:90 ; fixed-address 10.25.131.17 ; }
- #host 27-48 { hardware ethernet ; fixed-address ; }
- Host 27-48 { hardware ethernet 00:16:6B:C8:3D:C9 ; fixed-address 10.25.129.185
- outputLine="Host $((names[i]))-$((startingNumber+counter)) { hardware ethernet $first ; fixed-address $second"
- outputLine="Host $((names[i]))-$((startingNumber+counter)) { hardware ethernet $first ; fixed-address $second ; }"
- ; } 27-48 { hardware ethernet 00:16:6B:C8:3D:C9 ; fixed-address 10.25.129.185
- for ((j=1; j<=${sizes[i]}; j++ )); do
- #split line, read split as two entries for an arrIN
- IN=(${line[counter+1]})
- arrIN=(${IN//;/ })
- first="${arrIN[0]}"
- second=${arrIN[1]}
- if [ ${lineSize[counter+1]} -gt 5 ]
- then
- #sed 's/$/ ; }/' $outputLine > newoutputLine
- outputLine="Host $((names[i]))-$((startingNumber+counter)) { hardware ethernet $first ; fixed-address $second"
- echo $outputLine
- else
- echo "#host $((names[i])) $((startingNumber+counter)) { hardware ethernet ; fixed-address ; }"
- fi
- counter=$((counter+1))
- done
- $ printf 'abcrd' # `printf 'r'` produces a CR
- dbc # It LOOKS LIKE 'd' replaced 'a', but that's an artifact of printing to the terminal.
- $ printf 'abcrd' | cat -et
- abc^Md # ^M represents a CR (r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement