Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1034448
  • 博文数量: 239
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 3618
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-12 13:17
文章分类

全部博文(239)

文章存档

2021年(1)

2016年(1)

2015年(30)

2014年(91)

2013年(116)

发布时间:2013-10-30 10:15:03

脚本如下#!/bin/bashfor u in `awk -F: '{print $1}' /etc/passwd`; do    if [[ -d "/home/$u" ]]; then        if [[ -r "/home/$u/.bash_history" ]]; then            cat /home/$u/.bash_history > /tmp/$u.txtt        fi&.........【阅读全文】

阅读(1456) | 评论(0) | 转发(0)

发布时间:2013-08-19 18:20:33

通过ps -Af|grep openfire 能够得到openfire进程的进程号(openfire没有stop的shell,真是蹩脚)而在shell 脚本里很难通过 ps -Af|grep openfire 得到正在运行的openfire进程号,在网上找了好久也没有发现有一个好的办法,仔细想想在每次启动openfire时可以得进程号,然后把进程号写入一个文件中,当想要kill掉openfire进.........【阅读全文】

阅读(1011) | 评论(0) | 转发(0)

发布时间:2013-08-17 20:38:49

1.用s///替换[root@oa1 home]# cat test1 #!/usr/bin/perl$_ = "He's out bowling with Barney tonight.";s/Barney/Fred/;print "$_\n";[root@oa1 home]# ./test1 He's out bowling with Fred tonight.2.用$1替换变量[root@oa1 home]# cat test2 #!/usr/bin/perl$_ = "He's out bowling with B.........【阅读全文】

阅读(1789) | 评论(0) | 转发(0)

发布时间:2013-06-15 18:44:28

1.$_ = "yabba dabba doo";if (/abba/){    print "It matched!\n"}表达式/abba/会在$_中寻找4个字符组成的串,如果找到就返回真2./fred\t*barney/能够匹配fred 和barney之间有任意多个制表符的串。/fred\tbarney/能够匹配一个制表符/fred\t\tbarney/来匹配两个制表符/fred+/会匹配fedddddd这样的字符.........【阅读全文】

阅读(1022) | 评论(0) | 转发(0)

发布时间:2013-06-13 09:50:49

脚本功能:定时备份oracle数据库,上传到指定服务器,删除时间超过14天的备份文件。#=========================================================================# Purpose:exp Oracle DB orcl to file orcl_YYYYMMDDHHMM.dmp,#         and Delete the file,30 days ago created # Author :.........【阅读全文】

阅读(1413) | 评论(1) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册