gpt4 book ai didi

unix - 寻找匹配的 `"时出现意外 EOF '

转载 作者:行者123 更新时间:2023-12-04 21:23:42 25 4
gpt4 key购买 nike

我正在编写一个脚本,它具有如下执行命令:

cat /abc | grep -v ^# | grep -i root  | sed -e '\''s/"//g'\'' | awk '\''{print $2}'\''

在 SunOS 上运行脚本时,出现以下错误:
test: line 1: unexpected EOF while looking for matching `"'
test: line 3: syntax error: unexpected end of file

尝试了不同的选择......但没有运气。

需要有人帮助我确定上述命令中缺少的内容。

最佳答案

那些逃脱是什么?!

cat /abc | grep -v '^#' | grep -i root | sed -e '\''s/"//g'\'' | awk '\''{print $2}'\''
^ ^ ^ ^

你的问题是:
sed -e '\''s/"//g'\''
^ unmatched

关于unix - 寻找匹配的 `"时出现意外 EOF ',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7414602/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com