eepykate / fet.sh

🐢 a fetch written in posix shell without any external commands (sponsored by https://git.io/kiwmi)
https://github.com/buffet/kiwmi
ISC License
366 stars 22 forks source link

Lack of information outputted for non-linux os's. #31

Open foxsouns opened 2 years ago

foxsouns commented 2 years ago

Made to address the readme. It's here so that it can be motivation for others (and maybe me 😳) to resolve it.

eepykate commented 2 years ago

😳

yaazkal commented 2 years ago

Awesome script!

Not able to do a PR at the moment, but let me leave some FreeBSD commands for information that is not showed at the moment:

Uptime uptime | awk '{ print $3 }' | sed 's/,//'

Hostname hostname

Running kernel version: freebsd-version -k

Number of Installed ports using pkg: pkg info | wc -l | awk '{ print $1 }'

I hope it helps.

foxsouns commented 2 years ago

@yaazkal that will help, tysm! i think ill try to impl these later, probably.

eepykate commented 2 years ago

:peek:

(Also, don't forget that the focus of this project is to only use shell builtins & reading from files, which is part of the reason there isn't that much info shown even in the best case (ie: no GPU detection/printing))

yaazkal commented 2 years ago

don't forget that the focus of this project is to only use shell builtins & reading from files

I wrote the comment since all the commands used comes already with the OS. So no dependency is needed.

Also, as an example (just picking one thing), why reading/searching in a file to get the memory when sysctl also gives that?

In FreeBSD sysctl -n hw.realmem and sysctl -n hw.usermem are there to be used. I mean, less lines of code, even cleaner and guess what? as in unix everything is a file we are not breaking the "reading from files" rule.

Regards !

eepykate commented 2 years ago

why reading/searching in a file to get the memory when sysctl also gives that? Even though it's cleaner & shorter, sysctl wasn't used due to being an external command, which goes against the goal/challenge of this project (only using things built into POSIX shell, and by extension; reading from external files)

That also means that things like package managers/awk/sed/etc go against the goal/challenge, even though they'd be available on every system & not affect compatibility.

yaazkal commented 2 years ago

ok, sorry for my misunderstanding of the project and the noise.

Regards !

eepykate commented 2 years ago

No worries lol