$'..'
#!/bin/sh IFS=$' \t\n'
#!/bin/sh # Note: \n can not be last, or it will be stripped by $() IFS=$(printf ' \n\t')
or
#!/bin/sh # Trailing linefeed added literally IFS="$(printf ' \t') "
#!/bin/bash # Bash supports this IFS=$' \t\n'
ANSI-C quoting, $'..', is a bash extension, which is not supported by POSIX sh.
bash
sh
To ensure the script runs correctly on other systems, either switch to Bash, or rewrite it in a POSIX compatible way.
This can generally done via printf as in the example. Be careful about strings with trailing linefeeds, as a $(command substitution) will strip them.
printf
$(command substitution)
None.
POSIX.1-2024 introduced Dollar-Single-Quotes. This rule was last applicable to POSIX.1-2017.
There was an error while loading. Please reload this page.