• lurch (he/him)@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    31
    arrow-down
    1
    ·
    9 days ago

    the real reason why ppl use CLI is how easy it is to automate and repeat things and chain/pipe commands.

    you can basically just copy a few commands you typed into a text file and run that script later if you need it more than once.

    also most shells have some kind of history. it’s so useful. GUIs don’t have a “do that thing i did last week again” function.

    • lightnsfw@reddthat.com
      link
      fedilink
      English
      arrow-up
      5
      ·
      9 days ago

      Yeah, I recently had to make a bunch of payload files for programming some devices, all the files were mostly the same with only a couple parameters changed. I wrote a script to do it and was done in 20 minutes. That would have taken hours in the GUI. Then when I was putting the files onto flash drives the data protection crap my company uses was blocking part of the transfer because of the extension on the files. So I wrote another script to change the extensions, copy, and change it back. Saved more hours.

    • Cenzorrll@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      8 days ago

      Yeah, I’m not a wizard at the command line or anything, but there are so many things that are just quicker and easier. If I run it enough, I’ll copy the command to a script if it’s complicated, or at least save it for reference later.

        • lightnsfw@reddthat.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 days ago

          Well, kind of. I’ve never gotten a fully usable script out of it for anything complicated. Always have to fix it up myself before it works. Usually gives me a decent starting point though.