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. vchar2和nvchar2

    Oracle中varchar2 nvarchar2 VARCHAR2(size),可变长度的字符串,其最大长度为 size 个字节.size 的最大值是 4000,而最小值是 1.您必须指定一个 VA ...

  2. Hibernate ManyToOne, OneToMany的理解

    User to Group, Many to One的关系 Test Case 1: session.beginTransaction(); user.setGroup(group); session ...

  3. validate插件深入学习-03validate()方法配置项

    validate()方法配置项 rules 定义校验规则 messages 定义提示信息 上面这两个已经介绍过了 rules里隐藏的属性depends,只有符合条件(返回true)的时候才会执行 su ...

  4. mysql基本命令整理

    1.replace into(insert into 的增强版) replace into tbl_name(col_name, ...) values(...)replace into tbl_na ...

  5. JavaScript中的防篡改对象

    由于JavaScript共享的特性,任何对象都可以被放在同一环境下运行的代码修改. 例如: var person = {name:"caibin'} person.age = 21; 即使第 ...

  6. 高效的插入子节点DocumentFragment

    DocumentFragment 对象 DocumentFragment 接口表示文档的一部分(或一段).更确切地说,它表示一个或多个邻接的 Document 节点和它们的所有子孙节点. Docume ...

  7. SQL基础--索引

    索引的概念: 在数据库中索引是用于提升数据库查询操作性能的一种手段,但在频繁更新的表上,索引反而会降低性能. 常用的索引结构: B*树索引 位图索引 B树索引: B书索引是最基本的索引结构,Oracl ...

  8. /etc/ethers【地址映射】

    该文件存放硬件地址和 IP 地址的映射关系. 格式如下: 00-00-00-00-00-00 0:0:0:0 每一行代表一个 IP 地址.

  9. mysql order by in 的字符顺序

    //MySQL 语句SELECT * FROM `MyTable`WHERE `id` IN (11,1,111) ORDER BY FIELD(`id`, 11,1,111); laravel 框架 ...

  10. xml报文解析和组装

    package com.xjts.cipher.util;import java.io.File;import java.io.FileWriter;import java.io.IOExceptio ...