Skip to main content
1 of 5
Kusalananda
  • 356.6k
  • 42
  • 739
  • 1.1k

Slightly confused about whether printf in the yash shell is a built-in command or not

The yash shell has a printf built-in, according to its manual.

However, this is what I see in a yash shell with default configuration:

kk@eeyore ~ $ command -v printf /usr/bin/printf kk@eeyore ~ $ type printf printf: a regular built-in at /usr/bin/printf 

Is printf a built-in in this shell or not?

As a comparison, in pdksh (ksh on OpenBSD, where printf is not a built-in):

$ command -v printf /usr/bin/printf $ type printf printf is /usr/bin/printf 

And in bash (where printf is a built-in):

$ command -v printf printf $ type printf printf is a shell builtin 
Kusalananda
  • 356.6k
  • 42
  • 739
  • 1.1k