Shell and bash builtins...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Shell and bash builtins...
# 1  
Old 11-17-2013
Shell and bash builtins...

Not sure if this is the right forum but I have collated a listing of shell and bash builtins.

Builtins is a loose word and may include the '/bin' drawer/folder/directory but NOT any
others in the path list.

In the case of my Macbook Pro, OSX 10.7.5 the enabled internals is also listed...
Code:
From a bash terminal just enter:-
help <internal command>

shell builtins:-

builtin, !, %, ., :, @, {, }, alias, alloc, bg, bind, bindkey, break,
breaksw, builtins, case, cd, chdir, command, complete, continue, default,
dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval,
exec, exit, export, false, fc, fg, filetest, fi, for, foreach, getopts,
glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit,
local, log, login, logout, ls-F, nice, nohup, notify, onintr, popd,
printenv, pushd, pwd, read, readonly, rehash, repeat, return, sched, set,
setenv, settc, setty, setvar, shift, source, stop, suspend, switch,
telltc, test, then, time, times, trap, true, type, ulimit, umask,
unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait,
where, which, while

bash builtins:-

source
alias
bg
bind
readline
break
builtin
caller
cd
command
compgen
complete
bashdefault
default
dirnames
filenames
nospace
plusdirs
arrayvar
binding
directory
disabled
enabled
export
function
group
helptopic
hostname
job
keyword
running
service
setopt
shopt
signal
stopped
user
variable
compotp
continue
declare
typeset
dirs
disown
echo
enable <- *** IMPORTANT ***
eval
exec
exit
fc
fg
getopts
hash
help
history
kill
let
local
logout
mapfile
readarray
popd
printf
pushd
pwd
read
readonly
return
set
allexport
braceexpand
emacs
arrexit
errtrace
functrace
hashall
histexpand
ignoreeof
keyword
monitor
noclobber
noexec
noglob
nolog
notify
nounset
onecmd
physical
pipefail
posix
privileged
verbose
vi
xtrace
shift
suspend
test
times
trap
type
ulimit
unmask
unalias
unset
wait

Enabled _builtin_ commands:

enable .
enable :
enable [
enable alias
enable bg
enable bind
enable break
enable builtin
enable caller
enable cd
enable command
enable compgen
enable complete
enable continue
enable declare
enable dirs
enable disown
enable echo
enable enable
enable eval
enable exec
enable exit
enable export
enable false
enable fc
enable fg
enable getopts
enable hash
enable help
enable history
enable jobs
enable kill
enable let
enable local
enable logout
enable popd
enable printf
enable pushd
enable pwd
enable read
enable readonly
enable return
enable set
enable shift
enable shopt
enable source
enable suspend
enable test
enable times
enable trap
enable true
enable type
enable typeset
enable ulimit
enable umask
enable unalias
enable unset
enable wait

# 2  
Old 11-17-2013
There is a lot more to builtins.

http://www.gnu.org/software/bash/man...-Builtins.html - complete documentation.

http://www.tldp.org/LDP/abs/html/internal.html - discusses the 'why' and general use of builtins

Roll your own bash builtins:
http://cfajohnson.com/shell/articles...ally-loadable/

PS: I don't see a question.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ? --- Post updated at 08:39 AM --- in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies

2. Shell Programming and Scripting

Different behavior between bash shell and bash script for cmd

So I'm trying to pass certain json elements as env vars and use them later on in a script. Sample json: JSON='{ "Element1": "file-123456", "Element2": "Name, of, company written in, a very weird way", "Element3": "path/to/some/file.txt", }' (part of the) script: for s... (5 Replies)
Discussion started by: da1
5 Replies

3. UNIX for Dummies Questions & Answers

Which of the following command displays your login shell in bash shell?

Options:: A)$shell B)echo $ bash C)echo $ O D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies

4. UNIX for Dummies Questions & Answers

Why does /bin contain binaries for builtins?

Why do shell builtins like echo and pwd have binaries in /bin? When I do which pwd, I get the one in /bin. that means that I am not using the builtin version? What determines which one gets used? Is the which command a definitive way to determine what is being run when I enter pwd? (16 Replies)
Discussion started by: glev2005
16 Replies

5. UNIX for Advanced & Expert Users

Writing Custom Builtins for KSH93

I am looking to create some ksh93 extensions using the custom builtin feature. I can successfully create a builtin function, load it using the builtin -f command and get an output. However, I want to get/set values of KSH variables from within my built-in. For example, lets say I am creating... (2 Replies)
Discussion started by: a_programmer
2 Replies

6. Programming

pthread_mutex_lock in ANSI C vs using Atomic builtins of GCC

I have a program which has 7-8 threads, and lots of shared variables; these variables (and also they may not the primitive type, they may be enum or struct ), then they may read/write by different threads at the same time. Now, my design is like this, typedef unsigned short int UINT16;... (14 Replies)
Discussion started by: sehang
14 Replies

7. Shell Programming and Scripting

program name and function name builtins

Hi Is there a way to get the program/script name or function name usng built ins. Like in many languages arg holds the program name regards (2 Replies)
Discussion started by: xiamin
2 Replies

8. Shell Programming and Scripting

I need to understand the differences between the bash shell and the Bourne shell

I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done. I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies

9. Shell Programming and Scripting

Bash Shell to sh Shell In a Script

Hi All, I am in Bash Shell and Running A script that contains Exit statement in that in last ( to return to sh shell after executing) But it is not coming to sh shell after the script is excuted. How to return to sh shell from bash shell through a script. (8 Replies)
Discussion started by: saurabh84g
8 Replies

10. Shell Programming and Scripting

Run a C Shell using only Bash shell

Hi, I have only bash on my system. And I want to run a C shell... Is there a way for that? (3 Replies)
Discussion started by: HSN
3 Replies
Login or Register to Ask a Question