文件读取

SHELL读取文件的方法 1. 使用read命令读取一行数据 while read myline do echo "LINE:"$myline done < datafile.txt cat datafile.txt | while read myline do echo "LINE:"$myline done cat datafile.txt | while myline=$(line) do echo "LINE:"$myline done while myline=$(line) do echo "LINE:"$myline done < datafile.txt 2. 使用read命令读取变量数据 cat datafile.txt | while read paraa parab parac do echo "PARAA:"$paraa echo "PARAB:"$parab echo …


Linux 搭建KMS服务器

1. 在Linux服务器上自建KMS服务器 2. 激活方法 3. 下面提供各种版本的KMS KEY
 Windows10 Windows Server 2012 R2 and Windows 8.1 Windows Server 2012 and Windows 8 Windows 7 and Windows Server 2008 R2 Windows Vista and Windows Server 2008 1. 在Linux服务器上自建KMS服务器 #!/bin/bash if [[ `id -u` -ne 0 ]] then echo "root privilege is needed for this script" exit 1 …


Html2CSV

#!/usr/bin/python # -*- coding: iso-8859-1 -*- # Hello, this program is written in Python - http://python.org programname = 'html2csv - version 2002-09-20 - http://sebsauvage.net' import sys, getopt, os.path, glob, HTMLParser, re try: import psyco ; psyco.jit() # If present, use psyco to accelerate the program except: pass def usage(progname): ''' Display program usage. ''' progname …


Mysql 修改密码 、创建用户以及允许远程访问

1. 修改密码 用 set password 命令 mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); mysqladmin mysqladmin -u root password "newpass" or mysqladmin -u root password oldpass "newpass" update 修改mysql.user 表 mysql -u root mysql> use mysql; mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root'; mysql> FLUSH PRIVILEGES; 丢失root密码时 mysqld_safe --skip-grant-tables& …


openSUSE leap 42.x阿里源

zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.1/oss  openSUSE-42.1-Update-Oss zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.1/non-oss/ openSUSE-42.1-Update-Non-Oss zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.1/repo/oss/ openSUSE-42.1-Oss zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.1/repo/non-oss/  openSUSE-42.1-Non-Oss zypper addrepo -f http://mirrors.aliyun.com/packman/openSUSE_Leap_42.1/ aliyun-packman zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.2/oss/ openSUSE-42.2-Update-Oss zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.2/non-oss/ openSUSE-42.2-Update-Non-Oss zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.2/repo/non-oss/ openSUSE-42.2-Non-Oss zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.2/repo/oss/ openSUSE-42.2-Oss zypper addrepo -f http://mirrors.aliyun.com/packman/openSUSE_Leap_42.2/ aliyun-packman


Fix “Configuration of pmadb… not OK” in phpMyAdmin

To fix this you have to import/create the phpmyadmin database with it’s tables. An SQL script called create_tables.sql should be in the scripts, examples or sql folder of your phpMyAdmin installation. mysql -u root -p < create_tables.sql Then create a user called pma and give it permissions to the phpmyadmin database: CREATE USER 'pma'@'localhost' IDENTIFIED …

1 2