• RalphFurley@lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    16 hours ago

    I love using it for writing scripts that need to sanitize data. One example I had a bash script that looped through a csv containing domain names and ran AXFR lookups to grab the DNS records and dump into a text file.

    These were domains on a Windows server that was being retired. The python script I had Copilot write was to clean up the output and make the new zone files ready for import into PowerDNS. Made sure the SOA and all that junk was set. Pdns would import the new zone files into a SQL backend.

    Sure I could’ve written it myself but I’m not a python developer. It took about 10 minutes of prompting, checking the code, re-prompting then testing. Saved me a couple hours of work easy.

    I use it all the time to output simple automation tasks when something like Ansible isn’t apropos