td p { margin-bottom: 0in }
p { margin-bottom: 0.1in; line-height: 120% }
a:link { }

5.1

printenv

view Global variables

bash

new shell

set

Global variables and local
variables

export test

Local → Global, so it can be accessed in both subshell and
main shell.

unset test

Delete a variable, no $ needed.

PATH=$PATH:...

append PATH, no “” needed, export needed to make it global.

.bashrc

define own aliases

User-defined
variables are lower-cased; while sys variables are upper.

test=testing;

remember there is
no BLANK;

bash: new a shell,
the subshell has no $test variable for it is user-defined; so it is
with the subshell.

To fix this, we can “export test”, and NO $ needed.

When unset a global
var, it only influent the subshell who execute this cmd.

# add a alias

echo "alias ll='ls -al'" >> /home/joker/.bashrc

Shell study note的更多相关文章

  1. shell learning note

      shell learning note MAIN="/usr/local/" # 变量大写 STATUS="$MAIN/status" # 美元符加字符串是 ...

  2. Beginning Scala study note(9) Scala and Java Interoperability

    1. Translating Java Classes to Scala Classes Example 1: # a class declaration in Java public class B ...

  3. Beginning Scala study note(8) Scala Type System

    1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the h ...

  4. Beginning Scala study note(7) Trait

    A trait provides code reusability in Scala by encapsulating method and state and then offing possibi ...

  5. Beginning Scala study note(6) Scala Collections

    Scala's object-oriented collections support mutable and immutable type hierarchies. Also support fun ...

  6. Beginning Scala study note(5) Pattern Matching

    The basic functional cornerstones of Scala: immutable data types, passing of functions as parameters ...

  7. Beginning Scala study note(4) Functional Programming in Scala

    1. Functional programming treats computation as the evaluation of mathematical and avoids state and ...

  8. Beginning Scala study note(3) Object Orientation in Scala

    1. The three principles of OOP are encapsulation(封装性), inheritance(继承性) and polymorphism(多态性). examp ...

  9. Beginning Scala study note(2) Basics of Scala

    1. Variables (1) Three ways to define variables: 1) val refers to define an immutable variable; scal ...

随机推荐

  1. Java程序的编码规范

    所有的程序开发手册都包含了各种规则.一些习惯自由程序人员可能对这些规则很不适应,但是在多个开发人员共同写作的情况下,这些规则是必需的.这不仅仅是为了开发效率来考虑,而且也是为了后期维护考虑. 一.命名 ...

  2. Android卸载程序之后跳转到指定的反馈页面

    一个应用被用户卸载肯定是有理由的,而开发者却未必能得知这一重要的理由,毕竟用户很少会主动反馈建议,多半就是用得不爽就卸,如果能在被卸载后获取到用户的一些反馈,那对开发者进一步改进应用是非常有利的.目前 ...

  3. Dreamweaver架设网站终极教程

    转自:http://www.cnblogs.com/loveme513/archive/2006/04/03/365969.html 一.定义站点 1. 在任意一个根目录下创建好一个文件夹(我们这里假 ...

  4. WebForm 控件

    一.简单控件 1.Label(作用:显示文字) Web中: <asp:Label ID="Label1" runat="server" Text=&quo ...

  5. 谷歌input框黄色背景问题

    input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autof ...

  6. Snipaste

    http://files.cnblogs.com/files/hwd13/Snipast.zip

  7. MySQL 5.6 双机热备windows7

    MySQL 5.6 双机热备 目录: 1.说明 2.数据手工同步 3.修改主数据库配置文件 4.修改从数据库配置文件 5.主数据库添加备份用户 6.从数据库设置为Slave 7.验证 1.说明 1)数 ...

  8. python走起之第六话

    面向过程 VS 面向对象 编程范式 编程是 程序 员 用特定的语法+数据结构+算法组成的代码来告诉计算机如何执行任务的过程 , 一个程序是程序员为了得到一个任务结果而编写的一组指令的集合,正所谓条条大 ...

  9. 你的指纹还安全吗? - BlackHat 2015 黑帽大会总结 day 2

    你的指纹还安全吗?  0x03 FINGERPRINTS ON MOBILE DEVICES: ABUSING AND LEAKING speaker是来自FireEye的Wei Tao和Zhang ...

  10. hdu4087ALetter to Programmers(三维旋转矩阵)

    参考 三维旋转矩阵 + 矩阵加速 这个还要用到仿射变换. 平移 translate tx ty tz 1 0 0 tx 0 1 0 ty 0 0 1 tz 0 0 0 1 缩放 scale kx ky ...