Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'I believe you mean echo' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I believe you mean echo
Authored by: boredzo on Nov 02, '07 01:49:17PM

cat will read a file by that name (and fail). echo is the command you're looking for.

[ Reply to This | # ]
That was cat redirect
Authored by: MJCube on Nov 03, '07 04:23:06PM
No, mountainbiker is correct. Notice the > in that line. That takes the standard in and writes it to a file.

[ Reply to This | # ]
That was cat redirect
Authored by: OlKentuckyShark on Nov 04, '07 02:53:34AM

Nope. Give it a try. He definitely meant echo.

That command will attempt to open a file called "I love vi and Unix!" and dump its contents to /etc/motd.

And unless such a file exists, /etc/motd will just end up being blank.

[ Reply to This | # ]
Yepper ... echo (instead of cat)
Authored by: mountainbiker on Nov 04, '07 11:31:24PM
My bad -- use echo:

sudo echo "I love vi and Unix!" > /etc/motd

* and maybe more coffee ... assuming you have coffee on your file system -LOL ZZ

[ Reply to This | # ]