亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
樓主: yinyuemi
打印 上一主題 下一主題

[學(xué)習(xí)共享] awk初學(xué)之常見問題 [復(fù)制鏈接]

論壇徽章:
2
射手座
日期:2014-10-10 15:59:4715-16賽季CBA聯(lián)賽之上海
日期:2016-03-03 10:27:14
71 [報(bào)告]
發(fā)表于 2012-07-18 00:00 |只看該作者
本帖最后由 yinyuemi 于 2012-07-18 00:01 編輯

回復(fù) 69# guoweiqust
-path pattern
              File name matches shell pattern  pattern.   The  metacharacters  do  not
              treat `/' or `.' specially; so, for example,
                        find . -path "./sr*sc"
              will print an entry for a directory called `./src/misc' (if one exists).
              To ignore a whole directory tree, use -prune rather than checking  every
              file  in  the  tree.  For example, to skip the directory `src/emacs' and
              all files and directories under it, and print the  names  of  the  other
              files found, do something like this:
                        find . -path ./src/emacs -prune -o -print

              Note  that the pattern match test applies to the whole file name, starting
              from one of the start points named on the command  line.   It  would
              only  make sense to use an absolute path name here if the relevant start
              point is also an absolute path.  This means that this command will never
              match anything:
                        find bar -path /foo/bar/myfile -print
              Find  compares  the -path argument with the concatenation of a directory
              name and the base name of the file it's examining.  Since the concatenation
              will never end with a slash, -path arguments ending in a slash will
              match nothing (except perhaps a start point  specified  on  the  command
              line).   The predicate -path is also supported by HP-UX find and will be
              in a forthcoming version of the POSIX standard.

論壇徽章:
0
72 [報(bào)告]
發(fā)表于 2012-07-18 09:17 |只看該作者
回復(fù) 71# yinyuemi

這段話中所說的是不是這樣的:
1>其中第一段話說明是man page中的,講的是-prune的作用
2>第二段說明如果start point用的是絕對(duì)路徑,則-path不能使用相對(duì)路徑
  1. x900010-p0024@login1-565% find chinaunix -path chinaunix/awk_basic -prune -o -print
  2. chinaunix
  3. chinaunix/datafile
  4. chinaunix/repeat
復(fù)制代碼
  1. x900010-p0024@login1-566% find chinaunix -path ./chinaunix/awk_basic -prune -o -print
  2. chinaunix
  3. chinaunix/datafile
  4. chinaunix/awk_basic
  5. chinaunix/awk_basic/grade.txt
  6. chinaunix/awk_basic/student_tot.awk
  7. chinaunix/awk_basic/temp
  8. chinaunix/awk_basic/strip
  9. chinaunix/awk_basic/grade_student.txt
  10. chinaunix/awk_basic/grade_student.awk
  11. chinaunix/repeat
復(fù)制代碼
3>第三段說明檢查連續(xù)路徑時(shí),-path的argument不能以slash結(jié)尾
  1. x900010-p0024@login1-567% find chinaunix -path chinaunix/awk_basic/ -prune -o -print
  2. chinaunix
  3. chinaunix/datafile
  4. chinaunix/awk_basic
  5. chinaunix/awk_basic/grade.txt
  6. chinaunix/awk_basic/student_tot.awk
  7. chinaunix/awk_basic/temp
  8. chinaunix/awk_basic/strip
  9. chinaunix/awk_basic/grade_student.txt
  10. chinaunix/awk_basic/grade_student.awk
  11. chinaunix/repeat
復(fù)制代碼
是這樣嗎?
4>但是,我依然感覺不到和-o有什么關(guān)系,我把-o換成-a又得到不一樣的結(jié)果
  1. x900010-p0024@login1-571% find chinaunix -path chinaunix/awk_basic -prune -o -print
  2. chinaunix
  3. chinaunix/datafile
  4. chinaunix/repeat
復(fù)制代碼
換成-a
  1. x900010-p0024@login1-570% find chinaunix -path chinaunix/awk_basic -prune -a -print
  2. chinaunix/awk_basic
復(fù)制代碼
求賜教。。。
   

論壇徽章:
2
射手座
日期:2014-10-10 15:59:4715-16賽季CBA聯(lián)賽之上海
日期:2016-03-03 10:27:14
73 [報(bào)告]
發(fā)表于 2012-07-18 10:46 |只看該作者
回復(fù) 72# guoweiqust


    -a 和 -o 是邏輯判斷符號(hào),相當(dāng)于 “&&” 和 “||”
   
-prune True; if the file is a directory, do not descend into it. If -depth is given, false;  no  effect.
              Because -delete implies -depth, you cannot usefully use -prune and -delete together.

   上面是-prune的使用描述,注意它的值用于為真,除非有-depth。
   另外,find 命令執(zhí)行過程,可以理解為其后每個(gè)表達(dá)式邏輯判斷“匯總”的結(jié)果
   

論壇徽章:
0
74 [報(bào)告]
發(fā)表于 2012-07-31 16:35 |只看該作者
太棒了,學(xué)習(xí)了

論壇徽章:
2
數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-08-03 06:20:00IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-08-07 06:20:00
75 [報(bào)告]
發(fā)表于 2012-09-13 15:37 |只看該作者
謝謝分享 學(xué)習(xí)中

論壇徽章:
1
射手座
日期:2014-03-10 14:24:52
76 [報(bào)告]
發(fā)表于 2012-11-05 16:10 |只看該作者
又看了一遍還是有收獲,很多東西需要溫故知新。

論壇徽章:
0
77 [報(bào)告]
發(fā)表于 2013-01-12 19:50 |只看該作者
我也是非計(jì)算機(jī)專業(yè)的,向樓主學(xué)習(xí)!

論壇徽章:
0
78 [報(bào)告]
發(fā)表于 2013-03-12 10:10 |只看該作者
學(xué)習(xí)了。。。。

論壇徽章:
0
79 [報(bào)告]
發(fā)表于 2013-03-13 10:19 |只看該作者
收藏。。。。

論壇徽章:
1
黑曼巴
日期:2017-11-27 16:06:48
80 [報(bào)告]
發(fā)表于 2013-04-27 14:47 |只看該作者
膜拜了。這種帖子怎么讓他沉下去呢。
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP