cat << 'EOF' > test.sh echo $1 echo $2 echo $(echo "$1" | sed "s/?/'$2'/") EOF cat << EOF | xargs -0 sh test.sh "test?" xxx yyy EOF以上脚本执行出错: sed: -e expression #1, char 8: unterminated `s' command
请问xargs怎么把多行内容赋值到一个变量里?
cat << 'EOF' > test.sh echo $1 echo $2 echo $(echo "$1" | sed "s/?/'$2'/") EOF cat << EOF | xargs -0 sh test.sh "test?" xxx yyy EOF以上脚本执行出错: sed: -e expression #1, char 8: unterminated `s' command
请问xargs怎么把多行内容赋值到一个变量里?