这是我编写的脚本,用于检查具有给定IP的系统在Linux中是向上还是向下:
#!/bin/bash
clear
x=`date`
read -p "please enter ip:" ip
ping -c1 $ip>/dev/null 2>/dev/null
if [$?!= 0]; then
echo $ip on $x | mail -s "server is down…" admin
else
echo "server is up"
fi
我想为PowerShell编辑这段代码,这是我的代码:
$x = date
$IP
我正在尝试从linux终端备份数据库中的表。我正在使用下面的脚本来完成它,
GIT_MYSQL=/data/database/location to store
for T in `mysql -u [user] -h [Hostname] -p [database] -N -B -e 'show tables from database_name'`;
do
echo "Backing up $T"
mysqldump --skip-comments --compact -u [user] -p [password] [database] $T
我们在Cent OS linux服务器中有很多SQLite数据库(2.x版)。现在需要使用java读取这些数据库内容并对其执行一些操作。
我找不到与这个sqlite v2.X版本兼容的SQLite jdbc。
如果我尝试使用这里提供的最新jars (),我会得到这个错误,
Error :[SQLITE_NOTADB] File opened that is not a database file (file is encrypted or is not a database)
我在哪里可以找到用于SQLite v2.X的jdbc driver jar,或者有其他解决方法吗?