請問grep -f 的用法 - Linux

Caitlin avatar
By Caitlin
at 2013-01-03T21:18

Table of Contents

各位好

我現在想使用grep -f pattern_file target_file
這個指令方式

但是我現在遇到一個問題

我在pattern_file裡面的內容是
string
integer

按照指令的說明
應該會分別用string跟integer去做搜尋吧(?)

但是它卻只會用最後一個關鍵字integer去搜尋

是我的用法有錯還是pattern_file的內容不應該這樣呢?

感謝各位

--
Tags: Linux

All Comments

Kyle avatar
By Kyle
at 2013-01-05T18:31
我自己實驗是可以 有實粒麼 ?
Iris avatar
By Iris
at 2013-01-07T14:41
發現是文件格式的問題了,謝謝

switch to a process by PID

Michael avatar
By Michael
at 2013-01-03T13:07
請問一下今天我用了andamp;讓一個process在背景執行 然後我用ps查到了其PID 那我有什麼方法讓shell的焦點回到那個process呢? 我有查到jobs和fg可以切回去 但是當我logout後再login回去時 jobs就看不到這個process了 但是ps裡面它還是有在跑 - ...

跑UBUNTU的自組NAS

Selena avatar
By Selena
at 2013-01-03T10:55
※ [本文轉錄自 P2PSoftWare 看板 #1Gum1GMd ] 作者: kci9kimo (leecat) 看板: P2PSoftWare 標題: [心得] 跑UBUNTU的自組NAS 時間: Tue Jan 1 23:27:10 2013 之前都是租用box,一個月也是要千來元貴貴的...Or ...

Canonical 宣佈 Ubuntu 智慧型手機系統

Daph Bay avatar
By Daph Bay
at 2013-01-03T03:11
※ [本文轉錄自 MobileComm 看板 #1Gv8PTjF ] 作者: SicInfit (O_o) 看板: MobileComm 標題: [情報] Canonical 宣佈 Ubuntu 智慧型手機系統 時間: Thu Jan 3 03:11:23 2013 無廣告個人部落格原文:http:// ...

Centos預設Python如何救回

Yedda avatar
By Yedda
at 2013-01-02T15:48
小弟因為要使用Python2.6版本,因此把舊的Python刪除掉 卻發現Yum 無法使用 後來估狗才得知原來Centos有2.4.3預設Python ,不能隨意刪除atat 請問版上的大大們,我該如何救? 謝謝~~~ Yum 不能用整個很困擾~~ - ...

Debian 套件相依性問題

Ida avatar
By Ida
at 2013-01-02T11:44
大家好 我目前有台server遇到dependency issue: ``` The following packages have unmet dependencies: proxmox-ve-2.6.32 : Depends: pve-qemu-kvm but it is not going to ...