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.
如果我发出任何包含多行的命令,则需要在屏幕右侧打印,而不是在回显消息下方。
echo "我的文件详细信息:cat filename"
cat filename
我想得到什么:-
我的文件详细信息:xxxxxx-文件输出-xxxxxxxx
xxxxxx-file output-xxxxxxxx xxxxxx-file output-xxxxxxxx
您可以使用awk尝试此操作:
awk 'NR==1 {print "My File Details : ",$0} NR>1 {print " ",$0}' filename