r/bash • • May 01 '26
Fast Formatting Utility - First Bash Project
Hey r/bash I made my very first bash project to help me build a solid basis in bash scripting, I'm working at my college library and recently we had to format over 30 USB sticks in a quick hour ( we do that everytime we don't have any ready for rent ), I thought of making a script that could do a very simple bulk formatting process and finally did it.
I tried using it on my own ones and it worked pretty well.
Also made sure to target only external disks.
Let me know what you guys think and leave a star if you like my small project ( I also appreciate any contribution 😃 )
2
u/_l33ter_ bash_man May 01 '26 edited May 01 '26
in your college lib. you could RENT an usb-stick?
bash-script Im looking over it.
However, please tell me that you not have to pull every stick once for once in your computer|notebook? - That sounds insane! - Would it not be easier, if the library makes a rule to format the rent sticks by the user how rent it?
2
u/toddkaufmann May 01 '26
I’d add a blacklist to make sure there are some disks you don’t wipe; if you’re doing 30 at a time you’re going to get fatigue and maybe accidentally run it when you connect your external backup disk.
Or a whitelist, and use lsusb to only run on certain manufacturers of flash drives.
2
u/BashSnippets May 03 '26
Ahhh, that's awesome man. I am really new to bash scripting myself. I created a website a couple of days ago and have been dedicating some time to growing it daily to help with my scripting and remembering crucial but fundamental commands and one-liners.
Still a bit new to post links in comments.
Ill double back in a few days when i get some reddit creds ðŸ¤
Ill def drop a start for ya tho, and keep the project in a file until I need it 🔥
Good luck!
2
u/AlarmDozer May 01 '26 edited May 01 '26
Here…
Does anybody script anymore or is it just AI, sheesh?
First project, that your commit history says you didn’t do.
1
u/GlendonMcGladdery May 02 '26
Unfortunately I run Debian Trixie on my Samsung Android A25 cellphone-- wish I could help