Re: [Help-bash] Any way to make commenting one command in a long pipelin
From:
Chris F.A. Johnson
Subject:
Re: [Help-bash] Any way to make commenting one command in a long pipeline easy
Date:
Tue, 15 Oct 2019 02:24:42 -0400 (EDT)
User-agent:
Alpine 2.21 (DEB 202 2017-01-01)
On Tue, 15 Oct 2019, Peng Yu wrote:
Hi,
cmd1 | cmd 2 | ... | cmdn
Suppose that I have a long pipeline like the above. I'd like to
comment out a cmd (say cmdi) from the pipeline.
Although I can break the pipeline in multiple lines, I can not comment
out a command in the middle.
cmd1 | \
cmd2 | \
...
cmdn
Is there an easy way to comment out a command in a pipeline? Thanks.
cmd1 | ## comment
cmd2 | ## comment
cmd3
The backslashes are unnecessary.
--
Chris F.A. Johnson <http://cfajohnson.com/>
=========================== Author: ===============================
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Pro Bash Programming: Scripting the GNU/Linux shell (2009, Apress)