zip - игнорировать большой список конкретных файлов без выхода за пределы командной строки

awk '/NOTICE TO USERS/ { lastdelline=NR+17 };
    lastdelline>0 && NR<=lastdelline { next; }; { print; }' inputfile
2
12.12.2019, 01:35
1 ответ

Вы можете (как предложено на странице руководства )поместить свой список в файл, а не использовать позиционные параметры для списка:

   -x files
   --exclude files
          Explicitly exclude the specified files, as in:

                 zip -r foo foo -x \*.o

          which  will include the contents of foo in foo.zip while exclud‐
          ing all the files that end in .o.   The  backslash  avoids  the
          shell  filename  substitution, so that the name matching is per‐
          formed by zip at all directory levels.

          Also possible:

                 zip -r foo foo -x@exclude.lst

          which will include the contents of foo in foo.zip while  exclud‐
          ing   all  the  files  that  match  the  patterns  in  the  file
          exclude.lst.
2
27.01.2020, 22:08

Теги

Похожие вопросы