Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用类似 `expr 2 \\* grep -c ",2,1," my_course 的方法将 2 乘以包含字符串“,2,1”的行数,但出现 "expr: non-integer argument"错误。我是 Unix 新手,所以有人能指出我正确的方向吗
`expr 2 \\* grep -c ",2,1," my_course
"expr: non-integer argument"
被grep ...解释为 的参数expr,它有点不喜欢那串单词。您需要运行 grep 并将输出捕获为参数,例如:
grep ...
expr
expr 2 \* $(grep -c ",2,1," my_course)
在$(...)里面运行程序,并将返回的内容放入字符串列表中。
$(...)
(这与 bash,其他 shell 可能需要使用反引号而不是$(...))
在我的邮件客户端或 gmail 中,发件人始终是 apache@hosting12
有什么办法可以解决这个问题?我试过设置这样的标题但没有成功。有人可以帮帮我吗?
$headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;chars