Shell Scripting Tutorial

Variables in the Bourne shell do not have to be declared, as they do in languages like C.
But if you try to read an undeclared variable, the result is the empty string.

In order to receive environment changes back from the script, we must source the script - this effectively runs the script within our own interactive shell, instead of spawning another shell to run it.
. ./my.sh (.space./my.sh)

touch "${USER_NAME}_file"

The "." dot before the name of the library.sh is not a typo; it tells the calling shell not to spawn another shell for library.sh, so that its functions (and variables) become available to the calling shell.

Reference for keywords that are not search engine friendly

Shell Scripting 笔记的更多相关文章

  1. Linux Shell Scripting Cookbook 读书笔记 1

    本系列文章为<Linux Shell Scripting Cookbook>的读书笔记,只记录了我觉得工作中有用,而我还不是很熟练的命令 书是很好的书,有许多命令由于我比较熟悉,可能就没有 ...

  2. Learning The Bash Shell读书笔记(整理)

    最近搞了一本书 Learning Bash Shell,发现有人已经写了阅读笔记,我就在这边整理一下 来自blog:http://blog.sina.com.cn/n4mine Learning Th ...

  3. SHELL学习笔记----IF条件判断,判断条件

    SHELL学习笔记----IF条件判断,判断条件 前言: 无论什么编程语言都离不开条件判断.SHELL也不例外.  if list then           do something here   ...

  4. Shell编程笔记

    Shell编程笔记与Windows下熟悉的批处理类似,也可以将一些重复性的命令操作写成一个脚本方便处理.   修改别人的脚本,运行后遇到个问题 setenv: command not found 查证 ...

  5. Expert Shell Scripting

    Expert Shell Scripting 好好学习这本书

  6. shell学习笔记

    shell学习笔记 .查看/etc/shells,看看有几个可用的Shell . 曾经用过的命令存在.bash_history中,但是~/.bash_history记录的是前一次登录前记录的所有指令, ...

  7. Shell脚本笔记

      如何查询文件里的某个字符串? grep “字符串” 文件 例:grep "abc" tmp.txt   如何将查询出来的内容赋给变量? str=$(grep "abc ...

  8. 菜鸟教程之学习Shell script笔记(上)

    菜鸟教程之学习Shell script笔记 以下内容是,学习菜鸟shell教程整理的笔记 菜鸟教程之shell教程:http://www.runoob.com/linux/linux-shell.ht ...

  9. [转帖][Bash Shell] Shell学习笔记

    [Bash Shell] Shell学习笔记 http://www.cnblogs.com/maybe2030/p/5022595.html  阅读目录 编译型语言 解释型语言 5.1 作为可执行程序 ...

随机推荐

  1. Unit1:Android

    unit1 1.安卓版本 最新数据访问维基百科 2008年,android1.0 2011年,android3.0,平板失败 同年10月,android4.0,无差别使用 2014年,android5 ...

  2. 集群数据ID生成之美团叶子生成

    转自https://tech.meituan.com/2017/04/21/mt-leaf.html 在复杂分布式系统中,往往需要对大量的数据和消息进行唯一标识.如在美团点评的金融.支付.餐饮.酒店. ...

  3. netty学习心得2内存池

    http://frankfan915.iteye.com/blog/2199600 https://www.jianshu.com/p/13f72e0395c8:一个性能调优的文档,还有一些linux ...

  4. hystrix总结之请求批量执行

    hystrix可以将同一个命令的多次执行合并到一起执行. public class HelloWorldCommandCollapser extends HystrixCollapser<Lis ...

  5. Redis可视化工具推荐

    前言 Redis可视化工具目前好用的免费的几乎难以寻迹,百度能搜索到的推荐比较多的是Redis Desktop Manager 官网地址:https://redisdesktop.com/pricin ...

  6. 渗透测试方法论(qf总结)

    渗透测试(penetration testing , pentest)是实施安全评估(即审计)的具体手段.方法论是在指定.实施信息安全审计方案时,需要遵循的规则.惯例和过程.人们在评估网路.应用.系统 ...

  7. 谁说ParameterMap只能读不能写?

    开发过javaweb项目的同学,应该都接触过ServeltRequest吧?ServletRequest接口中有一个方法叫做getParameterMap(),他会返回一个Map<String, ...

  8. # js权威指南之对象篇

    对象是js中的关键 属性查找 in,Object.hasOwnProperty(),Object.propertyIsEnumerable()都能检测出对象内是否存在某个属性 in关键字 自有属性/继 ...

  9. CTFshow_Web入门源码

    Web1 题目打开始是这样的 直接看源码 Web2 题目打开是这样的,右键无法打开菜单,无法查看源码,F12也不可以 更改JavaScript权限,即可查看源码 Web3 真就抓个包看看 Web4 访 ...

  10. Spring Boot第五弹,WEB开发初了解~

    持续原创输出,点击上方蓝字关注我吧 目录 前言 Spring Boot 版本 前提条件(必须注意) 添加依赖 第一个接口开发 如何自定义tomcat的端口? 如何自定义项目路径? JSON格式化 日期 ...