Hi Chet,

I noticed that the Bash man page is a bit dense for new users
I've drafted a simple "EXAMPLES" section to provide common usage patterns
like -c and POSIX mode.
Please find the patch attached.
Best,
Syed Ismaeel
From 0c233bb165e0b7892ddfbf9f83273af6c6d816e0 Mon Sep 17 00:00:00 2001
From: Your Name <[email protected]>
Date: Tue, 28 Apr 2026 02:20:04 +0000
Subject: [PATCH] doc: add EXAMPLES section to bash man page

---
 doc/bash.1 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/doc/bash.1 b/doc/bash.1
index 5af3492..0857689 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -72,6 +72,27 @@ bash \- GNU Bourne-Again SHell
 .SH COPYRIGHT
 .if n Bash is Copyright (C) 1989-2025 by the Free Software Foundation, Inc.
 .if t Bash is Copyright \(co 1989-2025 by the Free Software Foundation, Inc.
+.SH EXAMPLES
+.PP
+.B bash
+can be used in several ways to execute commands:
+.PP
+.B "1. Execute a command string:"
+.br
+.B bash -c "echo Hello, $USER"
+.PP
+.B "2. Execute a script file:"
+.br
+.B bash script.sh
+.PP
+.B "3. Start an interactive shell with POSIX mode enabled:"
+.br
+.B bash --posix
+.PP
+.B "4. Read and execute commands from standard input:"
+.br
+.B echo "ls -l" | bash
+
 .SH DESCRIPTION
 .B Bash
 is a command language interpreter that
-- 
2.53.0

Reply via email to