login
Header Space

 
 

how to add a bash built in command

May 22, 2008 - 5:29am
Submitted by Anonymous on May 22, 2008 - 5:29am.
Linux

i was trying to add a new command as bash builtin command. For example, currently ls command runs either from /bin/ls or /usr/bin/ls. So i want to add this ls as a bash built in command so even though ls is not present in /bin or /usr/bin it should execute, i.e bash program should have all the instructions to execute ls command

why is this a kernel question?

May 22, 2008 - 6:03am

you can extend the PATH, use aliases or shell functions which search for a program or loop through the files, "echo *", busybox. tcsh has a builtin ls-F. you can even chroot to another installation.

Hey thanks for the reply at

May 22, 2008 - 6:42am
Anonymous (not verified)

Hey thanks for the reply at the same time my intention is to extend the bash functionality by adding new builtin functions to the bash source itself. aliases or shell functions will still run the binaries present in either /bin or /usr/bin. but i want to have an bash builtin command

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary