On 2022-01-25 09:12:52 +0100, Urs Thuermann wrote: > Greg Wooledge <g...@wooledge.org> writes: > > On Mon, Jan 24, 2022 at 05:01:21AM -0500, gene heskett wrote: > > > gene@coyote:~/Debian-arm/linux$ patch -p1 ../patches/*.patch > > > > That's not how you do it. patch(1) can only accept one patch at a time, > > and it expects to see it on standard input. > > > > for p in ../patches/*.patch; do patch -p1 < "$p"; done > > You can even do the somewhat easier > > cat ../patches/*.patch | patch -p1 > > which will do the same.
Even easier (works with zsh, multios enabled, which is the default): patch -p1 < ../patches/*.patch > However, often the order of patches is important when some patch > depends on another being applied before. Then *.patch will probably > not work since it applies patches in alphabetical order. Sometimes patch names are prepended with a number with a fixed number of digits (e.g., 3) to make sure that this works. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)