hack your life
脚本批量改变文件内容
受到知乎上一个问题的启发,打算写一个简单的脚本。
源码: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
./MagicShell /Users/Downloads/testHash-
directories
./MagicShell /Users/Downloads/testHashDirectory1 ./MagicShell /Users/Downloads/testHashDirectory2 -
a single file
./MagicShell /Users/Downloads/testHash/ file1.txt -
files
./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