Skip to main content
added 2 characters in body
Source Link
Chris Down
  • 130.3k
  • 26
  • 277
  • 268

-e is not POSIX (in fact, POSIX echo generally accepts no options (though, though it is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

Also see the caveats of \e in the comments below, which should be replaced with \033.

printf '\033[3;12r\033[3H'

-e is not POSIX (in fact, POSIX echo generally accepts no options (though is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

Also see the caveats of \e in the comments below, which should be replaced with \033.

printf '\033[3;12r\033[3H'

-e is not POSIX (in fact, POSIX echo generally accepts no options, though it is allowed to support -n, see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

Also see the caveats of \e in the comments below, which should be replaced with \033.

printf '\033[3;12r\033[3H'
added 93 characters in body
Source Link
Chris Down
  • 130.3k
  • 26
  • 277
  • 268

-e is not POSIX (in fact, POSIX echo generally accepts no options (though is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

Also see the caveats of \e in the comments below, which should be replaced with \033.

printf '\e[3;12r\e[3H''\033[3;12r\033[3H'

-e is not POSIX (in fact, POSIX echo generally accepts no options (though is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

printf '\e[3;12r\e[3H'

-e is not POSIX (in fact, POSIX echo generally accepts no options (though is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

Also see the caveats of \e in the comments below, which should be replaced with \033.

printf '\033[3;12r\033[3H'
added 49 characters in body
Source Link
Stéphane Chazelas
  • 584.7k
  • 96
  • 1.1k
  • 1.7k

-e is not POSIX (in fact, POSIX echo generally accepts no argumentsoptions (though is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

printf '\e[3;12r\e[3H'

-e is not POSIX (in fact, POSIX echo generally accepts no arguments, see here), and /bin/sh appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

printf '\e[3;12r\e[3H'

-e is not POSIX (in fact, POSIX echo generally accepts no options (though is allowed to support -n), see here), and /bin/sh on your system appears to be a POSIX shell. -e is an extension accepted in some shells, but you shouldn't rely on it, it's not portable. Ideally, use printf, or switch to using a shell which has echo -e.

printf '\e[3;12r\e[3H'
Source Link
Chris Down
  • 130.3k
  • 26
  • 277
  • 268
Loading