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. Concurrency vs. Parallelism

    http://getakka.net/docs/concepts/terminology Terminology and Concepts In this chapter we attempt to ...

  2. Excel怎样从一串字符中的某个指定“字符”前后截取字符及截取字符串常用函数

    怎么样可以从一串字符中的某个指定位置的前或后截取指定个数的字符. 如:12345.6789,我要截取小数点前(或后)的3个字符.怎么样操作, 另外,怎么样从右边截取字符,就是和left()函数相反的那 ...

  3. Ubuntu下的Notepad++:Notepadqq

    http://www.linuxidc.com/Linux/2015-07/120678.htm 适合从Win平台转移到Linux平台的用户,如果你之前一直再Win下使用nodepad++, 推荐你再 ...

  4. Javascript学习笔记:3种检测变量类型的方法

    ①typeof检测变量类型 console.log(typeof 1);//number console.log(typeof "a");//string console.log( ...

  5. python走起之第十七话

    选择器 #id 概述 根据给定的ID匹配一个元素. 使用任何的元字符(如 !"#$%&'()*+,./:;<=>?@[\]^`{|}~)作为名称的文本部分, 它必须被两个 ...

  6. 卷土重来之staticHtml基础使用教程

    前段时间发布了一个asp.net生存html缓存的东西,老实说坑了蛮多的人,bug比较多, 经过这段时间的测试与改进,应该到了可以使用的地步了, 欢迎大家测试与使用,下面我介绍使用教程,对了,这里感谢 ...

  7. bootstrap 分页表格插件

    找了两个table的插件,一个是bootstrap table ,另一个是bootstrap-paginator 这里只介绍 bootstrap table 插件 使用及简单案例 文档介绍:http: ...

  8. Gradle 使用本地的Jar包(gradle oracle ojdbc14 )

    Gradle 使用本地的Jar包(gradle oracle ojdbc14 ) 因为Oracle的驱动包在Maven上是没办法直接下载到的,所以在使用Gradle的使用,会导致无法加载Oracle, ...

  9. 网页边框样式与style样式部分总结

    1).border边框样式:border-style:solid 边框样式值如下: none : 无边框.与任何指定的border-width值无关 hidden : 隐藏边框.IE不支持 dotte ...

  10. 数字图像处理作业使用OpenCV - 配置

    使用环境:Windows7 旗舰版 + vs2008 + OpenCV2.0a 基本上配置都是通过网上一个教程,在此附上地址 Click ME. 为了避免因不同版本而出现的安装问题,我还是下载了2.0 ...