如何将输出更改tail为使用以空字符结尾的行而不是换行符?
我的问题类似于这个问题:如何在 bash 中对空分隔输入执行 `head` 和 `tail`?,但不同之处在于我想做一些类似的事情:
tail -f myFile.txt | xargs -i0 myCmd {} "arg1" "arg2"
Run Code Online (Sandbox Code Playgroud)
我没有使用find,所以不能使用-print0
这一切都是为了避免xargs中出现的错误:
xargs: unmatched double quote;
by default quotes are special to xargs unless you use the -0 option
Run Code Online (Sandbox Code Playgroud)