The first command does work as expected but not the second one. I want to add some text either at the beginning or the end.
# 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