{ "name": "basename", "section": 1, "title": "strip directory and suffix from pathnames", "synopsis": ["basename [OPTION]... [OPERAND]..."], "description": "Prints the last path component. Supports multiple paths with -a, suffix removal with -s or a second operand.", "options": [ { "flag": "-a, --multiple", "meaning": "Treat every operand as a path" }, { "flag": "-s SUFFIX, --suffix", "meaning": "Remove trailing SUFFIX from basename" } ], "keywords": ["basename", "bare-os", "coreutils"], "examples": [ { "caption": "strip directory", "code": "basename /home/user/docs/readme.md" }, { "caption": "strip suffix", "code": "basename -s .md /path/readme.md" }, { "caption": "several paths", "code": "basename -a /a/x /b/y" } ], "listCategory": "coreutils" }