sbc_compliant: (Default)
[personal profile] sbc_compliant
So, I had a customer today that had mistakenly added a bunch of hosts en masse to a config file via a GUI tool. The tool, however, does not allow for mass removal. So, the ticket came to me.

I removed the hosts from the config file using the magic of seq!

  • for i in `seq -w 036 1 200`; do command -rm "remove per [ticket_number]" host-complex$i.system.domain.tld; done


That -w flag is really handy for keeping the padding zeros in place, especially since the customer had started at such a non-round number.

Profile

sbc_compliant: (Default)
sbc_compliant

November 2019

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 10th, 2026 06:35 am
Powered by Dreamwidth Studios