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.
我正在弄清楚 Ipython shell 支持。它似乎 awk 不起作用,即遵循命令
!ls -l | awk '{print $1}'
只打印“1”。
如何将“$”符号正确传递给 shell。我正在使用 zsh。
两个美元符号给你一个字面的美元符号,所以试试:
!ls -l | awk '{print $$1}'
尝试转义$为\$
$
\$
!ls -l | awk '{print \$1}'