I am trying to use echo in GeekTool to print text without a newline like this:
echo -n "test"
When I run that command in Terminal it prints this:
In geek tool it prints this:
What is going on and how can I fix it?
After some experimenting, I've found that GeekTool seems to replace the token "echo" with an internal function that doesn't accept the
One solution: Give GeekTool the full path to
echo(1). For example,
/bin/echo -n "test" works where
echo -n "test" does not.
printf tends to be more portable than
echo. Does this work?
printf "%s" test
First GeekTool isn't a Shell its a Monitoring Tool which has a Shell mode plugin to use Scripts/Commands to get Information you can't get otherwise. Second if you would have done a simple man echo you should have seen that echo is a Shell builtin command so there is no actual executable.
Thats why GeekTool don't use the same echo (it simply can't cause it's a Shell builtin) so they made there own builtin echo command.
Now a little Question to maybe help you with your Struggling do you really need echo?
Maybe it is possible for you to paste the command you like to use and describe the result you'd like to get?
Then we can help you more.