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. 关于sqlserver 2008 无法远程连接的问题

    Sqlserver 2008 无法远程连接,原因无非如下: 1. Sql未配置为允许TCP/IP登录: 2. 防火墙未允许端口1433(或者其他在SQL配置中指定的端口): 3. 命名实例导致的无法连 ...

  2. 利用wangEditor获取文章格式和内容

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs& ...

  3. mate 标签的 http-equiv

    http-equiv 1. 页面的描述 <meta http-equiv="description" content="This is my page"& ...

  4. 详解Linux目录(目录树详细解释)

    给大家一篇关于Linux目录 方面的详细说明,好好读一下! Linux目录详解(RHEL5.4) linux有四种基本文件系统类型:--普通文件:如文本文件.c语言源代码.shell脚本等,可以用ca ...

  5. Python虚拟开发环境

    最近,一直在不同版本的Python之间来回折腾,发现了几个Python虚拟开发环境工具,具体如下: 1. Virtualenv,可以指定开发环境的Python版本.继承已有开发环境配置,virtual ...

  6. 3d游戏模型及地形提取及导航

    支持所有DirectX的游戏模型提取 有需要的可以直接联系我!QQ290387340

  7. Spark学习(一) -- Spark安装及简介

    标签(空格分隔): Spark 学习中的知识点:函数式编程.泛型编程.面向对象.并行编程. 任何工具的产生都会涉及这几个问题: 现实问题是什么? 理论模型的提出. 工程实现. 思考: 数据规模达到一台 ...

  8. C/C++内存泄露探测

    1. Visual Leak Detector for VC 在安装后, 只需要包含vld.h头文件即可.内容可以输出到文件或者控制台.

  9. 《BI那点儿事—数据的艺术》目录索引

    原创·<BI那点儿事—数据的艺术>教程免费发布 各位园友,大家好,我是Bobby,在学习BI和开发的项目的过程中有一些感悟和想法,整理和编写了一些学习资料,本来只是内部学习使用,但为了方便 ...

  10. python成长之路【第九篇】:网络编程

    一.套接字 1.1.套接字套接字最初是为同一主机上的应用程序所创建,使得主机上运行的一个程序(又名一个进程)与另一个运行的程序进行通信.这就是所谓的进程间通信(Inter Process Commun ...