https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ Conclusion In general, we can safely pass arbitrary command line arguments to programs, provided we take a few basic precau
@echo off rem CMD:"color --help" :: setting color:back white,content blue color f9 ::old string and replace string set old_str=ip set new_str=#ip :FILE set "souerce_path=D:\xxx\bat\my_test.txt" for /f "tokens=1* delims=:" %%i
sed -i :直接修改读取的文件内容,而不是输出到终端. sed -i 就是直接对文本文件进行操作的 替换每行第一次出现的字符串 sed -i 's/查找的字符串/替换的字符串/' 文件 替换文件中所有出现过的字符串 sed -i 's/查找的字符串/替换的字符串/g' 文件 例如,将文件GAOWEILIUSHI_201809_084中的|全部替换为|| sed -i 's/|/||/g' GAOWEILIUSHI_201809_084 sed -i 's/d/7523/'