0
第一個命令不按預期方式工作,但不是第二個的。 我想在開頭或結尾添加一些文字。一些文本添加到一堆線
# grep `date +'%y%m%d'` /var/log/mysqld.log
100101 10:56:00 mysqld started
100101 10:56:02 InnoDB: Started; log sequence number 1 2052750649
# sed 's/^/computer /g' < grep `date +'%y%m%d'` /var/log/mysqld.log
bash: grep: No such file or directory
# expected output
computer 100101 10:56:00 mysqld started
computer 100101 10:56:02 InnoDB: Started; log sequence number 1 2052750649