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. Windows DOS 窗口设置字体颜色

    2015-04-21 10:54:43 #include <windows.h> #include <iostream> using namespace std; #defin ...

  2. java web使用gradle配置详情

    博客说明:本片博客为FSSARB项目片面部分,目前项目还在更新中,请持续关注... 序言 项目构建工具从ant到maven,再到gradle,这是在严峻的技术考验下不停过度的结果.依照百度百科的阐述, ...

  3. 没人能阻止你,除了你自己——Keep up the good work!

    今天在网上搜索一些关于计算机专业的论坛或者博客,于是发现了博客园,就进来了.我想把我的一些关于计算机科学与技术领域的学习经历纪录在此,以便于能和大家一起分享,一起努力,一起进步.说实话我是临床医学专业 ...

  4. 使用Fusioncharts实现后台处理进度的前台展示

    本文要解决两个问题: 1.在ajax的数据交互中,如何获得后台的处理进度? 2.在前台界面中,如何使用图形化的方式展示后台处理进度?   关于第一个问题,不是本文的重点,简单说一下思路.因为HTTP协 ...

  5. SLAM前端技术选择思考

    以前是专门做室内定位技术研究的,先后学习和分析了多种基于电磁的室内定位技术,如WiFi指纹定位(先后出现过RSSI.CTF.CIR多种指纹特征).WiFi ToF定位.低功耗蓝牙BLE以及iBeaco ...

  6. python http代理代码

    googlecode :https://code.google.com/archive/p/python-proxy/source/default/source # -*- coding: cp125 ...

  7. requirejs加载css样式表

    1. 在 https://github.com/guybedford/require-css 下载到require-css包 2. 把css.js或者css.min.js复制到项目的js目录下 3. ...

  8. 把 Mac 上的 bash 换成 zsh

      本人补充:mac版git下载地址:http://code.google.com/p/git-osx-installer/downloads/list?can=3&q=&sort=- ...

  9. 【转】linux下安装ssh服务器端及ssh的安全配置

    一.在服务器上安装ssh的服务器端. $ sudo apt-get install openssh-server 2. 启动ssh-server. $ /etc/init.d/sshrestart 3 ...

  10. iOS - Card Identification 银行卡号识别

    1.CardIO 识别 框架 GitHub 下载地址 配置 1.把框架整个拉进自己的工程,然后在 TARGETS => Build Phases => Link Binary With L ...