[PATCH 1/3] scripts/remove_COLOPHON.sh: Allow passing directories to the script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 scripts/remove_COLOPHON.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/remove_COLOPHON.sh b/scripts/remove_COLOPHON.sh
index 712106656..780caab98 100755
--- a/scripts/remove_COLOPHON.sh
+++ b/scripts/remove_COLOPHON.sh
@@ -11,6 +11,7 @@
 ######################################################################
 #
 # (C) Copyright 2008 & 2013, Michael Kerrisk
+# and (C) Copyright 2022, Alejandro Colomar <alx.manpages@xxxxxxxxx>
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
@@ -23,6 +24,5 @@
 # (http://www.gnu.org/licenses/gpl-2.0.html).
 #
 #
-for f in "$@"; do
-    sed -i '/^\.SH COLOPHON/,$d' "$f"
-done
+find $@ -not -type d \
+|xargs sed -i '/^.SH COLOPHON/,$d';
-- 
2.30.2




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux