Questions tagged [shell-builtin]

A shell builtin is a command called from a shell, that is executed directly in the shell itself.

162 questions
12
votes
4 answers

When are the built-in commands loaded to memory

Let's say if I type in cd in my shell. Is cd loaded from the memory at that moment? My intuition is that these built-in commands are pre-loaded to the system memory after the kernel has been loaded, but someone insisted that they are loaded only…
Forethinker
  • 1,399
4
votes
2 answers

How to distinguish between builtin and external util? (e.g. echo)

Some commands are provided as both builtins and external utilities. Take echo for example. On my machine (macOS) running Bash 3.2, $ type echo echo is a shell builtin Running man bash | less --pattern='^ *echo +\[' shows: echo [-neE] [arg…
ivan
  • 1,878
2
votes
2 answers

Set shell environment variable without using a shell builtin command

I am using a program that takes a "command" as an argument and then adds some helpful wraping around it. Presumably in an effort to be helpful it appears to checks to make sure the command "exists". As far as I can tell this check is something like…
StrongBad
  • 5,261