Shell scripting supplies are the things you reach for while you practise: scripts, snippets, printed references, notes, test files and backups. Keep them in one system so a missing file costs seconds, not an afternoon. The aim is not a perfect library; it is a repeatable way to put each item back.
Decide what counts as a supply
Start by separating supplies from tools. Your editor, terminal and keyboard are tools; keep them clear of the supply box. Supplies are the movable items: active scripts, reusable snippets, one printed reference sheet, a notebook, test fixtures and backup media.
A beginner can work with no more than 10 active physical items and 50 active digital files. A practical starter set is one A5 notebook, one A4 folder, one labelled USB drive and one 2 cm ring binder. If an item has no clear use in the next 90 days, move it to archive rather than leaving it in the active pile.
Build three storage zones
Use three zones: active, reference and archive. The active zone is one A4 tray or one folder beside the machine. Keep only the current script, its test file and the notebook there. The reference zone is the binder and a digital reference folder. The archive zone is one lidded box for paper and one compressed folder for old files.
Set a hard limit: 12 files in the active digital zone and one notebook on the desk. When the limit is reached, archive the oldest item before adding a new one. This stops the active zone becoming a second archive.
Label with a date, topic and shell
Use one naming pattern everywhere: YYYY-MM-DD_topic_shell. For example, 2025-03-04_loops_bash. Write the same label on the notebook tab, the paper folder and the digital folder. A 24-label sheet is enough for a beginner’s first year; number spare labels 01–24 so you can replace worn ones.
If a label takes more than 20 seconds to read, rewrite it. Avoid labels such as “misc”, “old” or “test2”. Those words force you to open files to discover what they are.
Create a four-folder digital tree
Keep the digital side simple:
shell-lab/01-active shell-lab/02-snippets shell-lab/03-reference shell-lab/04-archive
Do not create more than one level of subfolders. Name snippets snippet_001_topic.sh and keep a plain 00-index.txt listing the number, topic and date added. Update the index every Friday for 10 minutes. Put dated backups of finished work in 04-archive; keep the working copy in 01-active only.
Make printed references earn their space
Print double-sided on A4 and keep no more than 20 pages in the binder. Use one tab per broad topic, such as variables, loops, conditions and error messages. Replace a page when it changes; do not add a second copy “just in case”.
Keep one A4 quick-reference sheet on the desk. If you have not opened a printed page in 90 days, move it to the archive box or recycle it. A small, current binder is faster to use than a full one.
Reconcile physical and digital supplies monthly
On the first Sunday of each month, spend 15 minutes comparing the notebook index with 00-index.txt. Move finished scripts from active to archive, remove duplicate printouts and check that the USB backup opens. Keep two backup copies: one labelled USB drive stored away from the desk and one folder on a separate drive.
Do not store passwords or API keys in a plain text notes file; use a password manager. If your scripts touch personal or regulated data, ask a qualified adviser before keeping extra copies.
Diagnose the “I know I saved it” failure
Symptoms: you remember the script name but cannot find the file, you open an old version, or three copies appear in different folders.
Likely causes: the active zone was never cleared, labels are vague, or backups were saved without dates. The fix is a 10-minute reset. Search by the date first, then by topic. Move duplicates into 04-archive/duplicates, rename the best copy to the YYYY-MM-DD_topic_shell pattern, and update 00-index.txt. If you still cannot find it after 10 minutes, recreate from the printed reference sheet and archive the old copy.
Prune and protect on a schedule
Use three rhythms: a 10-minute weekly reset, a 30-minute monthly backup and a 45-minute quarterly prune. At the quarterly prune, keep no more than 50 active digital files, 20 printed pages and 12 active scripts. Delete empty folders and worn labels. Check that the archive box is dry and that the USB drive is stored away from heat.
A fixed schedule beats a big annual tidy. Small resets keep the system usable, and the limits tell you when to stop adding and start archiving.
FAQ
How many folders should I create?
Start with four: active, snippets, reference and archive. Add a fifth only when a category has held more than 20 items for two months. More folders usually means more places to search.
Should I keep printed cheat sheets?
Yes, but keep at most 20 A4 sides in one 2 cm binder. If you have not opened a page in 90 days, archive or recycle it. Replace pages instead of adding duplicates.
How often should I reorganise?
Do a 10-minute reset weekly, a 15-minute reconciliation monthly and a 45-minute prune quarterly. Stop when the active folder has 12 or fewer files and the index matches the shelf.