load一个数据文件
来源:互联网 发布:冰点下载器 mac 编辑:程序博客网 时间:2024/05/28 06:06
#!/bin/bash. data-file # Load a data file.# Same effect as "source data-file", but more portable.# The file "data-file" must be present in current working directory,#+ since it is referred to by its 'basename'.# Now, reference some data from that file.echo "variable1 (from data-file) = $variable1"echo "variable3 (from data-file) = $variable3"let "sum = $variable2 + $variable4"echo "Sum of variable2 + variable4 (from data-file) = $sum"echo "message1 (from data-file) is \"$message1\""# Note: escaped quotesprint_message This is the message-print function in the data-file.exit 0
data-file
# This is a data file loaded by a script.# Files of this type may contain variables, functions, etc.# It may be loaded with a 'source' or '.' command by a shell script.# Let's initialize some variables.variable1=22variable2=474variable3=5variable4=97message1="Hello, how are you?"message2="Enough for now. Goodbye."print_message (){# Echoes any message passed to it. if [ -z "$1" ] then return 1 # Error, if argument missing. fi echo until [ -z "$1" ] do # Step through arguments passed to function. echo -n "$1" # Echo args one at a time, suppressing line feeds. echo -n " " # Insert spaces between words. shift # Next one. done echo return 0}
[root@localhost shell]# ./ex38.sh
variable1 (from data-file) = 22variable3 (from data-file) = 5
Sum of variable2 + variable4 (from data-file) = 571
message1 (from data-file) is "Hello, how are you?"
This is the message-print function in the data-file.
- load一个数据文件
- 数据文件格式(使用save和load命令)
- SQL*LOAD 数据文件与目标表数目不一致加载
- 《hbase学习》-03-命令行load数据文件到Hbase
- 数据文件
- 自制的一个自动备份数据文件脚本
- 一个TABLESPACE对应多个数据文件
- 删除了一个表空间的数据文件
- 给表空间增加一个数据文件
- 给表空间增加一个数据文件
- 通过Load table命令将数据文件加载到Sybase IQ数据库里面的Python脚本
- 仅仅丢失一个普通用户数据文件的恢复A(联机恢复)
- 仅仅丢失一个普通用户数据文件的恢复B(脱机恢复)
- 如何恢复一个只有完好数据文件的数据库?
- oracle中一个数据文件的最大值(非lob)
- 拥有归档日志 如何恢复一个丢失的数据文件
- 向oracle表空间添加一个数据文件命令
- Oracle恢复(四)------用RMAN恢复一个数据文件
- java实现webservice axis实例
- VB性能记录
- ecshop Undefined variable: data in 的问题处理方法
- TortoiseSVN Switch与Relocate的区别
- VC6.0下配置opencv1.0
- load一个数据文件
- php 正则 记一些自己想记的
- 复制来的幸福,始终粘贴不到自己身上:伤感日志
- Android 游戏开发之线程Thread延时开启和停止
- 欧几里德算法及其扩展算法
- 教育部首设儿童成长阶梯标准:4岁学会体谅父母
- Apache Hadoop 2.0-alpha发布
- linux exec用法总结
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your