Part 1
It is a weired book that it has no the part one but part two.
Part 2. Basics
Yes, very basic, if you can't master all of them, please don't get forward. Read it again and again until you can do every example without the book.
Part 3. Beyong the Basics
No, it is not beyong the basics, it is still basic knowledge. Read it again and agian.
This is my tricky to learn programming.
Part 4. Commands
haha, wolderful thing begins here.
......
Need more practice over these commands.
Part 5. Advanced Topics
There are a lot of interesting topics in this part. I read all of them and understand them. But I think I can't remeber them clearlly in the future.
IO Redirection - File Descriptor
LOGFILE=logfile.txt
exec 6>&1 #Make file descriptor 6 point to standard output.
exec > $LOGFILE # Make the standard output point to $LOGFILE, this command is default to exec 1> $LOGFILE
#Output any things, for example, echo "hello", the output goes $LOGFILE
exec 1>&6 6>&- # Recover the standard output and close the file descriptor 6
/dev and /proc
The /dev directory contains entries for the physical devices that may or may not be present in the hardware.
The /proc directory is actually a pseudo-filesystem. The files in /proc mirror currently running system and
kernel processes and contain information and statistics about them. It is a snapshot of the OS.
Think of /dev/null as a black hole. It is essentially the equivalent of a write-only file. Everything written to it disappears. Attempts to read or output from it result in nothing. All the same,/dev/null can be quite useful from both the command line and in scripts.
Like /dev/null, /dev/zero is a pseudo-device file, but it actually produces a stream of nulls(binary zeros, not the ASCII kind). Output written to /dev/zero disappears, and it is fairly difficult to actually read the nulls emitted there, though it can be done with od or a hex editor. The chief use of /dev/zero is creating an initialized dummy file of predetermined length intended as a temporary swap file.
分享到:
相关推荐
在阅读《Advanced Bash-Scripting Guide》这本书的过程中,我们能学到许多有关Bash脚本的高级用法和技巧。这本书对于那些想要提升其Bash脚本编写能力的用户来说是一份宝贵的资料。接下来,我将根据给定文件的部分...
《高级Bash脚本指南》英文原版是一本深入探讨Shell脚本艺术的专业书籍,由Mendel Cooper撰写。这本书致力于帮助读者掌握Bash shell编程的高级技巧和实践方法。以下是书中部分内容的详细解释: 在书的前言部分,作者...
进一步学习Shell,可以参考《Advanced Bash-Scripting Guide》或在线教程,如Linux Academy、Coursera等平台的相关课程。 总结,Linux Shell不仅是执行单一命令的工具,更是一种强大的自动化工具。理解并掌握Shell...
- 书籍:《Unix Shell Scripting》, 《Advanced Bash-Scripting Guide》。 - 在线教程:Mozilla Developer Network (MDN)的Shell教程,Stack Overflow的问答。 通过342课程的学习,学生应该能够熟练掌握这些Shell...