a secert garden
something about my life
1、通配符:
Basic wildcards

Wildcard

Matches

?

Any single character

*

Any string of characters

[set]

Any character in set

[!set]

Any character not in set


2、Bash内建命令和保留字:(builtins):(type栏中 R表示reserved words, 空白则表示内建命令)

Commands and reserved words

Command

Type

Summary

!

R

Logical NOT of a command exit status.

:

 

Do nothing (just do expansions of any arguments).

.

 

Read file and execute its contents in current shell.

alias

 

Set up shorthand for command or command line.

bg

 

Put job in background.

bind

 

Bind a key sequence to a readline function or macro.

break

 

Exit from surrounding for, select, while, or until loop.

builtin

 

Execute the specified shell built-in.

case

R

Reserved word. Multi-way conditional construct.

cd

 

Change working directory.

command

 

Run a command bypassing shell function lookup.

compgen

 

Generate possible completion matches.

complete

 

Specify how completion should be performed.

continue

 

Skip to next iteration of for, select, while, or until loop.

declare

 

Declare variables and give them attributes.

dirs

 

Display the list of currently remembered directories.

disown

 

Remove a job from the job table.

do

R

Part of a for, select, while, or until looping construct.

done

R

Part of a for, select, while, or until looping construct.

echo

 

Expand and print any arguments.

elif

R

Part of an if construct.

else

R

Part of an if construct.

enable

 

Enable and disable built-in shell commands.

esac

R

Part of a case construct.

eval

 

Run the given arguments through command-line processing.

exec

 

Replace the shell with the given program.

exit

 

Exit from the shell.

export

 

Create environment variables.

fc

 

Fix command (edit history file).

fg

 

Put background job in foreground.

fi

R

Part of an if construct.

for

R

Looping construct.

function

R

Define a function.

getopts

 

Process command-line options.

hash

 

Full pathnames are determined and remembered.

help

 

Display helpful information on built-in commands.

history

 

Display command history.

if

R

Conditional construct.

in

R

Part of a case construct.

jobs

 

List any background jobs.

kill

 

Send a signal to a process.

let

 

Arithmetic variable assignment.

local

 

Create a local variable.

logout

 

Exits a login shell.

popd

 

Removes a directory from the directory stack.

pushd

 

Adds a directory to the directory stack.

pwd

 

Print the working directory.

read

 

Read a line from standard input.

readonly

 

Make variables read-only (unassignable).

return

 

Return from the surrounding function or script.

select

R

Menu-generation construct.

set

 

Set options.

shift

 

Shift command-line arguments.

suspend

 

Suspend execution of a shell.

test

 

Evaluates a conditional expression.

then

R

Part of an if construct.

time

R

Run command pipeline and print execution times. The format of the output can be controlled with TIMEFORMAT.

times

 

Print the accumulated user and system times for processes run from the shell.

trap

 

Set up a signal-catching routine.

type

 

Identify the source of a command.

typeset

 

Declare variables and give them attributes. Same as declare.

ulimit

 

Set/show process resource limits.

umask

 

Set/show file permission mask.

unalias

 

Remove alias definitions.

unset

 

Remove definitions of variables or functions.

until

R

Looping construct.

wait

 

Wait for background job(s) to finish.

while

R

Looping construct.


Reference:

Learning the bash Shell, 3rd Edition
By Cameron Newham

Publisher: O'Reilly
Pub Date: March 2005
ISBN: 0-596-00965-8


posted on 2007-10-30 15:30 猪猪侠 阅读(72) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。
网站导航:

<2007年10月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

常用链接

留言簿(3)

随笔分类(60)

随笔档案(23)

相册

积分与排名

  • 积分 - 4865
  • 排名 - 458

最新评论