随笔分类 -  UNIX

UNIX Command Library.
Perl初级教程 (5) 遍历文件夹内指定扩展名文件,查找匹配关键字的输出。
摘要:#!/usr/bin/perl -W## File: find.pl# License: GPL-2use strict;use warnings;use File::Find;#定义要匹配的关键字my $str1="20090414095014";my $str2="Report";#定义键盘接收输入,第一个为文件夹路径,第二个为文件扩展名。die "Usage: $0 <dir> <extion>\n" unless @ARGV == 2;my $Dir = $ARGV[0] ;my $Ext = $ARG 阅读全文
posted @ 2012-07-25 14:05 zencorn 阅读(3569) 评论(0) 推荐(0)
Perl 基于 Windows 环境 搭建
摘要:1.下载Perl 的安装包 ActivePerl.2.运行安装文件.3. 创建一个perl 脚本文件,执行语句.c:\Perl\bin>perl.exee:\David\PerlTempHelloWorld.4. 如正常执行,则Perl在windows下安装成功.5. 将Perl 加为环境变量. 阅读全文
posted @ 2011-09-19 15:47 zencorn 阅读(4714) 评论(0) 推荐(0)
FTP 上传文件 命令
摘要:建立一个调用FTP命令的BAT file, autoftp.log 作为一个日志文件 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->echo==========================================>>autoftp.logdate/t>>autoftp.logtime/t>>autoftp.logftp-n-s:"upload.ftp">>aut 阅读全文
posted @ 2010-11-08 17:03 zencorn 阅读(333) 评论(0) 推荐(0)
UNIX-Perl-Uninstall
摘要: 阅读全文
posted @ 2010-10-21 10:40 zencorn 阅读(177) 评论(0) 推荐(0)
UNIX - Perl 批处理。
摘要:#! /bin/ksh#source=$1#dest=$2#portnumber=$3#exp=$4/home/genuser/makelinks.pl -bd $1 -hd $2var1=$2#var2=$3#var3=$1var4=$3let var4=$3+10var5=$2/etc/geneva.inilet var1=$3+12var6=$2/etc/dbaserver.ini#echo... 阅读全文
posted @ 2010-10-09 13:22 zencorn 阅读(404) 评论(0) 推荐(0)
[转 - 改] Perl初级教程 (三)
摘要:【文件处理】下面是一个简单的perl程序,与UNIX中cat命令对某个文件的操作相同。每次的操作过程被包围在花括号内。程序块中的$Item第一次被赋予@FruitList数组中的第一个值,然后被赋予数组的第二个值,依次类推。如果@FruitList是空的,那么程序块将不会被执行【判断】判断是检验表达式结果是真是假的一种结构。在Perl中,任何非0数字和非空字符串被看作真。数字0、0字符串和空字符串... 阅读全文
posted @ 2010-05-20 14:57 zencorn 阅读(228) 评论(0) 推荐(1)
[转 - 改] Perl初级教程 (二)
摘要:【对于字符串】$b = 'BB';$c = 'CC';$a = 'AA';$a = $b . $c;   # Concatenate $b and $c = BBCC$a = $b x $c;   # $b repeated $c times【Perl的赋值语句】$a = $b;      # Assign $b to $a$a += $b; # Add $b to $a  (算数运算)$a -=... 阅读全文
posted @ 2010-05-19 14:40 zencorn 阅读(216) 评论(0) 推荐(0)
[转 - 改] Perl初级教程 (一)
摘要:【原文地址】 Perl初级教程 注-- 本文UNIX系统环境为 SunOS 5.1 Generic # uname -a1. 创建UNIX文件touch PerlFile2.修改UNIX文件的存取权限chmod 777 PerlFileCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->chmod600×××(只有所有者有读和写的权限)chmod644×××(所有者有读和写的权限,组用户 阅读全文
posted @ 2010-05-19 11:04 zencorn 阅读(299) 评论(0) 推荐(1)
UNIX SSH 命令
摘要:从当前服务器控制台转换到目标服务器上。SSH [UNIX Server IP] 阅读全文
posted @ 2010-04-13 10:49 zencorn 阅读(1377) 评论(0) 推荐(0)