#假设为admin用户,主机A为server端
-
rsyncd.conf 配置文件
max connections = 4 syslog facility = local5
pid file = /tmp/_rsyncd.pid
print -v variable "%o" \'A # variable: 101 in octal | |
echo $'\101' # produce: A, 101 is octal code of Character 'A' | |
echo $'\x41' # produce: A, 41 is hex code of Character 'A' | |
echo $'\u4e2d' # produce: 中, 4e2d is hex code order of ‘中’ in unicode character table. | |
print "%x" \'中 # produce: 4e2d, ... | |
#!/bin/env bash | |
############################################################ | |
#Author : ChinaXing - chen.yack@gmail.com | |
#Create : 2013-01-20 15:56 | |
#Function : check hosts status | |
# 检查服务器状态: | |
# 1. 网络链接 | |
# a. ESTAB链接列表 | |
# b. LISTEN端口列表 | |
# 2. 进程 |
#!/bin/env bash | |
# ----------------------------------------------------------------------------------------- | |
# Function : install rpm package by yum tool | |
# | |
# Date : 2013-04-24 | |
# 2013-05-07, 去掉日志输出,只输出结果,输出结果进行调整 | |
# 2013-06-08, 添加选项化参数,增加appname 这一参数 | |
# 2014-03-06, 如果appname目录没有则创建 | |
# 2014-03-12, 增加t-admin-noweb-tomcat, t-admin-deploy-withnginx 分为tomcat和jboss | |
# |
#!/bin/sh | |
#****************************************************************# | |
# ScriptName: cpu-map.sh | |
# Author: yunxing.cyx@taobao.com | |
# Create Date: 2013-03-29 13:03 | |
# Modify Author: $SHTERM_REAL_USER@alibaba-inc.com | |
# Modify Date: 2013-03-29 13:03 | |
# Function: | |
#***************************************************************# | |
cat /proc/cpuinfo \ |
#!/bin/env bash | |
declare -A COLORS=( ["RED"]=31 ["YELLOW"]=33 ) | |
COLOR_DEFAULT=YELLOW | |
function c_echo | |
{ | |
cb="\e[0;${COLORS[${2:-$COLOR_DEFAULT}]};1m" | |
ce="\e[0m" | |
echo -e "${cb}$1${ce}" | |
} |
UPDATE tableA SET column2 = column1 |
# | |
perl -MO=Deparse,-p -e ' my $x = \ $fh->fh ' | |
# prints : | |
# (my $x = \($fh->fh)); |
# PadWalker | |
use warnings; | |
use strict; | |
use PadWalker; | |
my $a = "A"; | |
my $b = "B"; |
# --- use B::Deparse module --- # | |
use B::Deparse; # or -MO=Deparse | |
sub mysub { | |
my $x = 20; | |
print "The X is : ", $x, "\n"; | |
} | |
my $deparse = B::Deparse->new; |