AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() envsubst expands only environment variable references.(By contrast, running the same on command on, e.g., a Ubuntu 12.04 system returns envsubst is hashed (/usr/bin/envsubst), which tells you that the utility is present and where it is located.)Ī makeshift alternative to envsubst is to use eval, although the usual caveat applies: use eval only on strings whose content you control or trust:Īssume a sample.txt file containing text with unexpanded variable references e.g.: cat > sample.txt <<'EOF' envsubst is not in your system's $PATH (and thus likely not present on your system).In the case at hand, running type envsubst on macOS 10.13 returns -bash: type: envsubst: not found, from which you can infer: To test whether a given command is a builtin, use type Commands directly built into bash are called builtins, and only they can be relied upon to be present on all platforms. ![]() envsubst is an external executable and thus not part of Bash external executables are platform-dependent, both in terms of which ones are available as well as their specific behavior and the specific options they support (though, hopefully, there is a common subset based on the POSIX specifications). ![]()
0 Comments
Read More
Leave a Reply. |