
Shell
frivol
这个作者很懒,什么都没留下…
展开
-
重定向 1>&2 2>&1
当初在shell中, 看到">&1"和">&2"始终不明白什么意思.经过在网上的搜索得以解惑.其实这是两种输出. 在 shell 程式中,最常使用的 FD (file descriptor) 大概有三个, 分别是: 0: Standard Input (STDIN) 1: Standard Output (STDOUT) 2: Standard Error Outp转载 2013-07-16 21:57:19 · 613 阅读 · 0 评论 -
在shell脚本中调用另一个脚本的三种不同方法(fork, exec, source)
fork ( /directory/script.sh) fork是最普通的, 就是直接在脚本里面用/directory/script.sh来调用script.sh这个脚本. 运行的时候开一个sub-shell执行调用的脚本,sub-shell执行的时候, parent-shell还在。 sub-shell执行完毕后返回parent-shell. sub转载 2013-07-17 23:53:08 · 624 阅读 · 0 评论 -
linux中shell变量$#,$@,$0,$1,$2的含义解释
linux中shell变量$#,$@,$0,$1,$2的含义解释: 变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出转载 2013-06-28 23:44:35 · 516 阅读 · 0 评论 -
$IFS 的含义
The IFS is a special shell variable.You can change the value of IFS as per your requirments.The Internal Field Separator (IFS) that is used for word splitting after expansion and to split lines into w转载 2013-07-21 20:13:41 · 2871 阅读 · 0 评论 -
hadoop启动脚本文件的解读(1.1.2)
先从start-all.sh开始 #!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for原创 2013-07-16 22:17:29 · 1233 阅读 · 0 评论 -
linux特殊符号大全
linux特殊符号大全 在shell中常用的特殊符号罗列如下: # ; ;; . , / \ 'string'| ! $ ${} $? $$ $* "string"* ** ? : ^ $# $@ `command`{} [] [[]]转载 2013-07-21 21:12:06 · 799 阅读 · 0 评论