KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've read the man pages on echo, and it tells me that the -e parameter will allow an escaped character, such as an escaped n for newline, to have its special meaning. When I type the command $ echo -e 'foo\nbar' into an interactive bash shell, I get the expected output: foo bar But when I use this same command (i've tried this command character for character as a test case) I get the following output: -e foo bar It's as if echo is interpretting the -e as a parameter (because the newline still shows up) yet also it interprets the -e as a string to echo. What's going on here? How can I prevent the -e showing up?
Tags (comma-separated)
Save Edits
Cancel