From f7ce57c533c93a867bc83c991e0f4680f34b5dc3 Mon Sep 17 00:00:00 2001 From: Eric Wan Date: Fri, 27 Sep 2024 19:50:43 -0500 Subject: [PATCH] Is this supposed to be a '>', as the goal is to pipe the "Please install GPG" message to stderr? I don't understand why we would want to pipe stderr into the echo command --- commands.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.html b/commands.html index 221bbb3..5ca8c37 100644 --- a/commands.html +++ b/commands.html @@ -269,7 +269,7 @@

The basic grammar of a bash command

name () compound-command [ redirection ] exists() { [[ -x $(type -P "$1" 2>/dev/null) ]]; } -exists gpg || echo "Please install GPG." <&2 +exists gpg || echo "Please install GPG." >&2

You begin by specifying a name for your function. This is the name of your new command, you'll be able to run it later on by writing a simple command with that name.