in Linux "which source" returns nothing?
It is a builtin shell command, like cd
, exit
, pwd
...:
$ enable -p | grep sourceenable source
Note that enable -p
shows all the builtins. More info in enable Man page.
Update
Just saw a pretty interesting thread in SuperUser: What does source do?
$ type sourcesource is a shell builtin
Update 2 - comment by Tony D
@SIGSEGV: sometimes a command can be implemented as an external (non-shell) executable, but some shells will still want to provide their own implementation... possibly with different behaviour, possibly just to make it faster. test and pwd are examples of this. For example, the shell can get its current working directory using getcwd(), but if it runs a separate executable without changing the current directory for that executable, and the executable runs getcwd() - it still works.