• stembolts
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    3 days ago

    The most useful bash trick for me is to save what I learn in demonstration scripts so I can $cat it later for a syntax reminder.

    ex :
    file named : ./follow_jellyfin_system_log

    contents :
    #!/bin/bash
    journalclt -fe -u jellyfin

    (some time later) … wtf args do i pass to journalctl again…

    $ls ./script_parent_directory

    (list of actions written in human language appear as file names)

    $cat ./follow_jellyfin_system_log

    me : “oh duh!”

    rinse and repeat for every command or shortcut you learn, it forces you to convert the command into a short “noun_verb” format which to me is infinitely more understandable.


    that’s my workflow. then the meta is deciding how to store your scripts so you don’t end up with a polluted home dir. godspeed fellow bashers.

      • stembolts
        link
        fedilink
        English
        arrow-up
        4
        ·
        3 days ago

        Tbh, I should consider migrating some of my one-liners to bash aliases. I just like to be cautious to not pollute my shell’s auto-complete.