受到知乎上一个问题的启发,打算写一个简单的脚本。
源码:HackCloudDrive 已经上传了。README写得很清楚了。
可以顺道看一下shell ,也是很有意思的,改进了一下输入的参数,使这个脚本更加强大,哈哈。
HackCloudDrive
Use a shell to change the content of files.
Why I write this shell
This is a shell to chane the content of files,I write this in order to change the Hash of files in *** field.
reference
scripts-to-traverse-folder-recursively
how to use
- Download the MagicShell shell
- chmod +x MagicShell
- The parameter input can be
- a directory
1
./MagicShell /Users/Downloads/testHash
-
directories
1
./MagicShell /Users/Downloads/testHashDirectory1 ./MagicShell /Users/Downloads/testHashDirectory2
-
a single file
1
./MagicShell /Users/Downloads/testHash/ file1.txt
-
files
1
./MagicShell /Users/Downloads/testHash/file1.txt /Users/Downloads/testHash/file2.txt
at last
Those who do not understand UNIX are condemned to reinvent it, poorly.
—Henry Spencer
Where To Go From Here?
- Advanced Bash-Scripting Guide
- Unix Shell Programming
- Linux Shell Scripting Tutorial - A Beginner’s handbook