# [PATCH] Add missing semicolon to sed command.

2 messages from 2006-03-20 to 2006-03-20. Participants: Shawn Pearce, Junio C Hamano.
Thread: https://gitlist.dev/t/3680

## Shawn Pearce, 2006-03-20 00:18

Subject: [PATCH] Add missing semicolon to sed command.
Message-ID: <20060320001808.GB20765@spearce.org>
URL: https://gitlist.dev/e/20060320001808.GB20765%40spearce.org

```
generate-cmdlist.sh is giving errors messages from sed on Mac OS
10.4 due to a missing semicolon.

---

 generate-cmdlist.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

base f81e7c626f34658289594386b0273755f47912a2
last 09913c10d93adbfa61138b7ac7ae6a8a210aa29f
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 6ee85d5..76ba49c 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -42,7 +42,7 @@ EOF
 while read cmd
 do
     sed -n "/NAME/,/git-$cmd/H;
-	    \$ {x; s/.*git-$cmd - \\(.*\\)/  {\"$cmd\", \"\1\"},/; p}" \
+	    \$ {x; s/.*git-$cmd - \\(.*\\)/  {\"$cmd\", \"\1\"},/; p;}" \
 	"Documentation/git-$cmd.txt"
 done
 echo "};"
-- 
1.2.4.g41f6

```

## Junio C Hamano, 2006-03-20 02:15

Subject: Re: [PATCH] Add missing semicolon to sed command.
Message-ID: <7v1wwxn9nn.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1wwxn9nn.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060320001808.GB20765@spearce.org>

```
Shawn Pearce <spearce@spearce.org> writes:

> generate-cmdlist.sh is giving errors messages from sed on Mac OS
> 10.4 due to a missing semicolon.

I'll take this patch for now, but I've heard a horror story that
some other vintage of sed apparently does not like multiple
commands separated by semicolons at all, and I've been training
myself to do this kind of thing always as multi-line sed script,
like this:

     sed -n '
     /NAME/,/git-'"$cmd"'/H
     ${
            x
            s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
	    p
     }' "Documentation/git-$cmd.txt"

```
