Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • \$\begingroup\$ -t: is useless and you can use number<<<& \$\endgroup\$ Commented Dec 2, 2016 at 2:06
  • \$\begingroup\$ @izabera Yes - thanks - I removed the -t:. However, sed's eval feature runs commands using sh, so bash features like <<< won't work. \$\endgroup\$ Commented Dec 2, 2016 at 17:38
  • \$\begingroup\$ it works fine as long as your sh is bash :P \$\endgroup\$ Commented Dec 2, 2016 at 22:49
  • \$\begingroup\$ @izabera Nope - if bash as started as sh it tries to emulate Posix sh as much as possible, which means that bashisms such as <<< are turned off. GNU sed's eval feature starts commands with /bin/sh -c ... and not /bin/bash -c .... Have you tried this? \$\endgroup\$ Commented Dec 2, 2016 at 23:32
  • \$\begingroup\$ bash never turns off <<<, not even in posix mode \$\endgroup\$ Commented Dec 3, 2016 at 0:13