Skip to Content
bash shell脚本编程经典实例 (第2版)
book

bash shell脚本编程经典实例 (第2版)

by Carl Albing, JP Vossen
January 2021
Intermediate to advanced
581 pages
15h 7m
Chinese
Posts & Telecom Press
Content preview from bash shell脚本编程经典实例 (第2版)
410
17
出?可能是因为手册页遵循的是一种标准化、结构化且经过时间考验的格式,而
Texinfo
采用的形式更为自由。
如果你不喜欢
info
,还有别的
Texinfo
浏览器和转换工具,如
pinfo
info2www
tkman
甚至是
info2man
(先转换成
POD
,再转换成手册页格式)。
17.2.4
 参考
man info
man man
维基百科(
Textinfo
5.2
17.3
 批量解压
ZIP
文件
17.3.1
 问题
你想一次性解压目录下的多个
ZIP
文件,但
unzip *.zip
没有效果。
17.3.2
 解决方案
将模式放入单引号即可,不同于其他大多数
Unix
命令,
unzip
自己处理文件通配模式。
unzip '*.zip'
也可以用循环来解压各个文件。
for
x in /path/to/date*/name/*.zip;
do
unzip "$x";
done
或者:
for
x in
$(
ls /path/to/date*/name/*.zip 2>/dev/null
)
;
do
unzip $x;
done
17.3.3
 讨论
和很多
Unix
命令(如
gzip
bzip2
)不同,
unzip
的最后一个参数并不是任意长度的文
件列表。在处理命令
unzip *.zip
时,
shell
会扩展其中的通配符,因此(假设你有若干文
件,文件名分别为
zipfile1.zip
zipfile4.zip
),
unzip *.zip
会扩展为
unzip zipfile1.zip
zipfile2.zip zipfile3.zip ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

bash 网络安全运维

bash 网络安全运维

Paul Troncone, Carl Albing
Linux 内核观测技术BPF

Linux 内核观测技术BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 9787115553782