News for hackers. Stuff that matters.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by jjjz on Friday August 12, 2022 @02:05AM (#32435142)
(don't forget "-e" for echo)

  while true; do echo -en "  $(date)\r"; sleep 1; done
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by faho on Friday August 12, 2022 @02:44AM (#32435316)
Depends on your echo. Zsh's interpretes escape sequences by default unless the "BSD_ECHO" option is used, bash's doesn't unless "xpg_echo" is on.

And xpg_echo is on by default for bash on macOS, so for users on macOS it looks like echo interprets escapes by default.

This is one of the reasons why echo is hopelessly unportable.

See https://unix.stackexchange.com/a/65819/55665

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by jrumbut on Friday August 12, 2022 @04:07AM (#32435738)
Learn something new every day!

And I wish we had a stronger word than unportable for echo. You see that word tossed around on shell scripting resources where the only system it applies to is a 30 year old version of ksh and it only blows up on a full moon when passed a filename with a literal form feed \f, but echo is a practical portability problem.