linux commands
来源:互联网 发布:linux 新建用户组 编辑:程序博客网 时间:2024/06/03 09:26
1. linux中,source和sh命令的区别?
这个命令其实只是简单地读取脚本里面的语句依次在当前shell里面执行,没有建立新的子shell。那么脚本里面所有新建、改变变量的语句都会保存在当前shell里面。
而sh命令则是在子shell中执行命令。该子shell继承父shell的环境变量,但子shell新建的、改变的变量不会被带回父shell,除非使用export。
2. sh scriptfile和./ scriptfile的区别?
当shell脚本具有可执行权限时,用sh filename与./filename执行脚本是没有区别得。./filename是因为当前目录没有在PATH中,所有"."是用来表示当前目录的。
0 0
- Linux Commands
- Linux Commands
- linux commands
- Linux Commands
- linux commands
- linux commands
- Linux commands
- linux commands
- Linux Commands
- Linux commands
- Linux commands
- Linux Commands
- Linux commands
- Linux commands
- linux commands
- Linux Commands
- linux commands and corresponding windows commands
- Linux Shortcuts and Commands
- Quartz入门
- 快速排序的优化
- 树莓派显示中文字体
- jQuery实现的地址选择
- C#关键字partial在asp.net mvc中的应用
- linux commands
- 4.Hibernate关系映射
- 第54篇撤销后笔迹的同步解决方案总结(三)
- VS2015常用快捷键
- 撞库介绍及个人信息保护
- orb-slam2+Windows系统+debug模式运行成功
- 常用无类路由协议组播地址
- 不调用free会内存泄露吗?
- 堆排序