shell 脚本
来源:互联网 发布:优化特色课程 编辑:程序博客网 时间:2024/06/11 09:04
linux下把环境变量的设置export 放到shell 脚本中?解决方案 设置环境变量,想把export放到脚本里。
这是我写的脚本:
export.sh
#!/bin/sh
export $='/opt/Qtopia4.4.3/bin:/sbin:/usr/sbin:/bin:/usr/bin'
export QPEDIR='/opt/Qtopia4.4.3'
export QTDIR='/opt/Qtopia4.4.3'
export QT_QWS_FONTDIR='/opt/Qtopia4.4.3/lib/fonts/'
export QT_PLUGIN_PATH='/opt/Qtopia4.4.3/plugins:/opt/Qtopia4.4.3/qt_plugins/'
export LD_LIBRARY_PATH='/opt/Qtopia4.4.3/lib'echo "IT IS OK"用sh 执行是没有效果的,
但用source 确被告知-/bin/sh: source: export.sh: not found
C/C++ code#!/bin/bashexport $='/opt/Qtopia4.4.3/bin:/sbin:/usr/sbin:/bin:/usr/bin'export QPEDIR='/opt/Qtopia4.4.3'export QTDIR='/opt/Qtopia4.4.3'export QT_QWS_FONTDIR='/opt/Qtopia4.4.3/lib/fonts/'export QT_PLUGIN_PATH='/opt/Qtopia4.4.3/plugins:/opt/Qtopia4.4.3/qt_plugins/'export LD_LIBRARY_PATH='/opt/Qtopia4.4.3/lib'echo "IT IS OK"#chmod 755 export.sh#source export.sh------解决方案--------------------------------------------------------. ./export.sh------解决方案--------------------------------------------------------第一行改成#!/bin/bash
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- shell 脚本
- SHELL 脚本
- shell脚本
- shell脚本
- shell 脚本
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- shell脚本
- 蓝牙(Bluetooth)---源码目录及设置应用源码分析
- 软件设计师考试说明
- insmod: error inserting 'sequans_usb.ko': -1 Unknown symbol in module
- kernel socket 实例
- SICP中parallel-execute
- shell 脚本
- ibitis简介及实例
- android调试工具MAT--安装
- JAVA反射机制
- ubuntu下搭建svn步骤
- 系统架构设计师考试说明
- 今天开始学模式识别与机器学习Pattern Recognition and Machine Learning 书,章节1.1,多项式曲线拟合(Polynomial Curve Fitting)
- JAVA基础--JAVA中的反射机制详解
- Andorid编程心得-Android中AsyncTask的使用