PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
0 sec ago
Untitled
1 sec ago
NĂºmero Palindromo 2.0
C++ | 5 sec ago
Untitled
5 sec ago
Untitled
11 sec ago
Untitled
11 sec ago
Untitled
11 sec ago
Tunnelprogramm
19 sec ago
Untitled
By: a guest on
Jan 4th, 2013
| syntax:
None
| size: 0.27 KB | hits: 19 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
% comment
filename1 pattern-to-search1
filename1 pattern-to-search2
...
while read file p
do
if [ "${file:0:1}" != "%" ]
then
grep -o "$p" $file | wc -l
fi
done
echo -e "nDone."
grep -v '^%' | while read file p
do
grep -c "$p" -- "$file"
done
create a
new version
of this paste
RAW Paste Data
% comment filename1 pattern-to-search1 filename1 pattern-to-search2 ... while read file p do if [ "${file:0:1}" != "%" ] then grep -o "$p" $file | wc -l fi done echo -e "nDone." grep -v '^%' | while read file p do grep -c "$p" -- "$file" done