我有一个unix文件,想将其转换为Windows批处理文件。它曾用于将.txt文件中的表上传到数据库。
#!/bin/sh
$HOME/.profile
dest_table=$2
file=$1
echo "$file"
sed -e 's/^M//g' $file > __tmp
cat __tmp > $file
nzload -u $NZ_USER -pw mypassword -db databasename -host $NZ_HOST -delim ',' -df "/input01/username/$file" -t $dest_table;
echo "done"
运行此文件的代码是:
upload.sh t12371.txt t12371_data
.txt文件中的数据将上传到数据库中的t12371_data。
如何转换代码以在Windows中运行它? 谢谢!