linux getopts命令,处理shell脚本参数
#!/bin/bash
while getopts "ab:cd:" Option
# b and d take arguments
#
do
case $Option in
a) echo -e "a = $OPTIND";;
b) echo -e "b = $OPTIND $OPTARG";;
c) echo -e "c = $OPTIND";;
d) echo -e "d = $OPTIND $OPTARG";;
esac
done
shift $(($OPTIND - 1))
相关文档:
第一步:在VMWARE中,运行启动LINUX后。点击VM->INSTALL VMWare TOOLS,点击OK。(补充:退出VMWARE回到XP用CTRL+ALT)
第二步:进入LINUX后,运行终端。执行mount /dev/cdrom以文件方式挂载光驱(如果没有第一步,就没有这一步,因为需要的TOOLS是以光驱文件形式存放) ......
脚本文件 backup.sh
#!/bin/sh
a=`date "+%y_%m%d_%H%M"`
echo $a
/home/oracle/10g/bin/exp username@password@//192.168.0.126/SID owner=username FILE=/opt/beifen/126_username_$a.dmp
备份的文件格式如:126_username_09_0920_2300.dmp
编写完shell脚本之后,要对其赋予可执行权限及其用户所属:
# chmod 7 ......
Oracle Database 10g Release 2 (10.2.0.1) Installation On Red Hat Enterprise Linux 5 (RHEL5)
一安装需求
1.swap 分区不低于2G
2.selinux 状态disable
3.物理内存不低于512M
系统组件
GNOME Desktop Environment
Editors
Graphical Internet
Text-based Internet
Development Libraries
Development Tools
......
#ifndef __KERNEL__
#define __KERNEL__
#endif
#ifndef MODULE
#define MODULE
#endif
#include<linux/config.h>
#include<linux/module.h>
#include<linux/version.h>
#include<linux/init.h>
#include<linux/kernel.h>
#include<linux/errno.h>
#include<linux/sche ......