I wrote a simple (5.6Kb) bash AUR helper for myself I'd like to share
github.comhttps://github.com/nelsonaloysio/AUR_bashRemoved before it was archived.
About this post
- Posted
- Archived
- Deleted on
- Score
- 64 · 100% up
- Kind
- Link
- ID
- feoat2
Removed before it was archived.
22 comments
Hey the capitalization matters for data sizes. kb (lowercase b) is kilobit whereas kB (capital B) is kilobyte. You probably already know the difference since you're writing aur helpers, but for the peanut gallery: theres 8 kb in a kB.
But they capitalised the 'k'...? Still incorrect, though.
The SI prefix for kilo is lowercase k. Uppercase K is the symbol for the unit kelvin. Beyond kilo (mega, giga, tera, etc.) the prefix should be uppercase.
Technically, yes. I wouldn't have said anything for that though because there's no ambiguity between kB and KB like there is between kb and kB.
You are right - went unnoticed. Thanks for correcting me!
For the record: this bash script has 5.6KiB (kilobytes). :)
Oh no, you've done it again :-D. KiB is kibibyte, not kilobyte (though colloquially kibibytes are often referred to as kilobytes)
nice work ...why would you put fi ; } on the same line with last condition command? i mean it hurts me to read xD jk
I guess it came down to style - I'm writing a lot of Python utilities recently, so it looked more natural to me, hehe.
Here's the list of available options if anyone's interested:
What prompted you to write this? What benefit might it serve over yay? Thanks!
I developed a bunch of small utilities that go along my common Terminal usage over time, then I started uploading them to GitHub for personal usage - so no reason whatsoever behind checking what I could do on my own, in pure bash code. I also wanted to keep the same parameters from pacman, for convenience, of course.
I don't believe it has any meaningful benefits over yay (or other AUR helpers for that matter), besides the extra parameters I included (-Ss/--search, -Q/--query, -F/--find, -w/--web). You might find those useful too - so you can extract the code from the script and use it on your own, in a separate file, if you already have your own wrapper. :)
That's cool! More genes in the AUR helper pool...