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版)
526
附录
C
1.
ll $(type -pathcc) ~alice/.*$(($$%1000))
将其分割成一系列单词。
2.
ll
并非关键字,因此第
2
步什么都不做
1
3.
ls -l $(type -path cc) ~alice/.*$(($$%1000))
将别名
ll
替换成
ls -l
。然后
shell
复第
1~3
步;第
2
步会将
ls -l
分割为
2
个单词。
4.
ls-l$(type -pathcc) ~alice/.*$(($$%1000))
什么都不做。
5.
ls -l $(type -path cc) /home/alice/.*$(($$%1000))
~alice
扩展成
/home/alice
6.
ls -l $(type -path cc) /home/alice/.*$((2537%1000))
$$
替换成
2537
7.
ls -l /usr/bin/cc/home/alice/.*$((2537%1000))
type -path cc
执行命令替换。
8.
ls -l /usr/bin/cc/home/alice/.*537
对算术表达式
2537%1000
求值。
9.
ls-l /usr/bin/cc/home/alice/.*537
什么都不做。
10.
ls -l /usr/bin/cc/home/alice/.hist537
将通配符表达式
.*537
替换成文件名。
11.
/usr/bin
中找到命令
ls
12.
执行包含选项
-l
和两个参数的
/usr/bin/ls
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