On weekdays, many things can be completed using scripts. Learn the necessary scripts and write the scripts to replace the manual ones.
Our goals are dry and automation.
Required tools:
Shell
Perl
Linux tools: SED, replace, find, xargs, and so on.
For example, you can use the replace command to replace some content in the file:
# Replace audio image -- File
Or, process all the objects in the current directory as follows:
# Find.-Type F-exec replace audio image --{}';'
Use sed to write the replace script:
#! /Bin/shtmp_file = temp_temp.tmpif [! $ #-EQ 3] Then ECHO "Usage: replace. sh match pattern file "; exit; fised-e" s/$1/$2/g "$3> $ tmp_filemv $ tmp_file $3
Then the application is as follows:
# Replace. Sh audio image file1
Or
# Find.-Type F-exec./replace. Sh audio image {}';'
The so-called cutting power without mistake, take some time to learn these script languages and write scripts to replace manual operations, will greatly improve work efficiency. For more information about dry and automation, see pragmatic programmer and the productive programmer.