---
title: "shell编程"
author: "libaohan"
date: "2010-10-15T15:06:33Z"
tags: []
categories: ["操作系统"]
slug: "shell"
draft: false
lastmod: "2010-10-15T15:06:33Z"
id: 785797
url: "https://libaohan.iteye.com/blog/785797"
---

一、如何用shell修改当前控制台的环境变量PATH?
   在shell文件中添加export的变量，然后用命令行chmod　+x　shell文件，则可以得到可执行文件。然后运行../shell文件名。注意两个点“.”。如果只用一个点的话，只能修改shell子进程里面的环境变量，第一个“.“表示在当前进程下面执行shell文件。