Permalink
Browse files

edit task

  • Loading branch information...
1 parent 20e4bca commit 53de9a4bb34b551c5302ee1cbec51c3c223133c7 @qzchenwl committed Apr 21, 2012
Showing with 27 additions and 0 deletions.
  1. +27 −0 2012/4/21/learn-bash.md
View
@@ -2,6 +2,8 @@
## 文本处理任务
+### 统计最受欢迎的文章
+
来自 [《处理Apache日志的Bash脚本》](http://www.ruanyifeng.com/blog/2012/01/a_bash_script_of_apache_log_analysis.html) -- 阮一峰
日志格式:
@@ -43,6 +45,31 @@ awk '$9 == 200 && $7 ~ /^\/blog\/2011\// { count[$7]++ } END { for (k in count)
* `cat www-*.log`将合并www-*.log多个文件送到标准输出。
* `<`将`cat`的stdout重定向到`awk`的stdin。类似的有`>`,左边的stdout重定向到右边的stdin。
+### 配置项变更
+
+找出新增的、修改的配置项。
+
+配置项格式
+```txt
+key = value
+```
+```txt
+# 老配置
+log4j.rootLogger = INFO, A1
+log4j.appender.A1 = org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout = org.apache.log4j.PatternLayout
+  
+log4j.appender.A1.layout.ConversionPattern = %-4r %-5p [%t] %37c %3x - %m%n
+
+# 新配置
+log4j.rootLogger = DEBUG, A1
+log4j.appender.A1 = org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout = org.apache.log4j.PatternLayout
+  
+log4j.appender.A1.layout.ConversionPattern = %-4r %-5p [%t] %37c %3x - %m%n
+log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+```
+
## Bash基本语法与内建命令
## 外部命令组合

0 comments on commit 53de9a4

Please sign in to comment.