2
I have an unzipping script on Linux.
It attempts to unzip with the command:
unzip file.zip
This is obviously successful.
I now wish to exclude some files. The manual tells me of the -x option. I used that and it works also, but only for a single specified folder or file.
A method often used to exclude specific files from zipping programs is to pass in a .txt file with a single exclusion pattern per line.
Is this possible with Linux Unzip?
I have tried:
unzip file.zip -x excl_file.txt
unzip file.zip -x@excl_file.txt
unzip file.zip -x "excl_file.txt"
None of these seem to be the appropriate syntax.
Surely you must mean
$(<excl_file.txt)
? – kojiro – 2014-03-24T14:01:27.587@kojiro Indeed, the file isn't to be executed! Thanks. – devnull – 2014-03-24T14:02:12.890
I am not very familiar with command substitution, do you mean $(<excl_file.txt) ? edit: Oh, beaten to it! – None – 2014-03-24T14:06:51.380
@Tom
$(<excl_txt)
is another way of saying$(cat excl_txt)
avoiding Useless Use of Cat. – devnull – 2014-03-24T14:09:12.107