• lilith267@lemmy.blahaj.zoneOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    12 hours ago

    Thanks a lot for the advice!

    Grabbing the content each time is a bit of a waste

    In practice fish is extremely more efficient then bash with the script profiling at 9ms. Not amazing but since this will only run once when opening the shell its small enough to not be noticeable

    There is also a file cat /proc/loadavg

    So thats where it was! My original script tried to loop over all the cpu max and mins and calculate the percentage before deciding uptime was just more practical. Thanks for the info!

    I see you like awk a lot BTW

    Its just so damn easy to grab the piece of info you want with lol

    Really thanks for all the feedback Ill have to work some of your advice in when I get back to my computer