Sponsored Content
Full Discussion: grep question
Top Forums UNIX for Dummies Questions & Answers grep question Post 302388334 by JustAnotherUser on Wednesday 20th of January 2010 04:01:48 AM
Old 01-20-2010
grep question

Hi everyone,

i am german, so excuse my bad english.
i got a problem with the grep-command.
i got a file with a lot of entries and i want to grep some of them out into another file.

here is a part of the file:
Code:
1038194    ξΟΥ΢ΙΝ & δΕ΢ΞΗΑΜΠ΢, βξη 10, 1886, 486, ΝΟ.
1038195    1;
1038196    λΟΕΩΨ, μδαἱἀ 11, 1886, 202, ΝΟ.
1038197    1;
1038198    ϜΑΝ γΕΛΔΕΡ, μΝΕΜΟ΢ΨΝΕ 24, 1896, 195, ΝΟ.
1038199    20;
1038200    Σγδι 4275;
1038201    ϜΑΝ γΕΛΔΕΡ, γΕ΢ΞΗΙΞΗΤΕ 443, ΝΟ.
1038202    21;
1038203    ρΟΒΕΡΤ, έΤ.
1038204    ΑΝΑΤ.
1038205    563.
1038206    8t 92.
1038207    ηΟΝΟΡΑΡΨ ΙΝ΢ΞΡΙΠΤΙΟΝ ΦΟΡ δΙΟΝΨ΢ΙΟ΢ αΝΤΑΓΟΡΑ ΟΦ ρΗΟΔΕ΢ ΒΨ ΔΑΥΓΗΤΕΡ μΕΝΕ΢ΤΡΑΤΕ δΙΟΝΨ΢ΙΟΥ ΟΦ ρΗΟΔΕ΢ ΕΤ ΑΛ.
1038208    , ΟΝ ΢ΤΑΤΥΕ-ΒΑ΢Ε;
1038209    ιι/ι;
1038210    ΦΟΥΝΔ ΑΤ μΟΒΟΛΛΑ:
1038211    ϕΕΛΛΟΩ΢, δΙ΢ΞΟϜΕΡΙΕ΢, γΕΡΜΑΝ ΤΡΑΝ΢ΛΑΤΙΟΝ 223 (ΝΟΝ ϜΙΔΙ);
1038212    ᾃΑΝ γΕΛΔΕΡ, μΝΕΜΟ΢ΨΝΕ 24, 1896, 196, ΝΟ.
1038213    22;
1038214    ϜΑΝ γΕΛΔΕΡ, γΕ΢ΞΗΙΞΗΤΕ 444, ΝΟ.
1038215    23.
1038216    6t 93.
1038217    ηΟΝΟΡΑΡΨ (?)
1038218    ΙΝ΢ΞΡΙΠΤΙΟΝ ΦΟΡ (?)

so, there is always a Integer-number at first, then a tabulator and after that is either a single word or a multi-word-unit.
now, what i want to do is grep ALL rows containing only MWU out.
rows with only 1 word should be ignored.

finally i want a new file that contains only the rows with MWUs.

can somebody help me?

thanks

Last edited by JustAnotherUser; 01-20-2010 at 05:18 AM.. Reason: something was wrong
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep question

what is the format for grep if I want to search from the current directory and through all its subdirectories?:) (3 Replies)
Discussion started by: pkappaz
3 Replies

2. UNIX for Dummies Questions & Answers

Grep Question

Hello Everybody, I have files; yyyymmdd.log which the data look like this; "Txid=9426043&MsgTxt=Thankyou&UserId=john&Password=jh2501" "Txid=9426150&MsgTxt=Thankyou&UserId=john&Password=jh2501" . . . "Txid=9426200&MsgTxt=Thankyou&UserId=john&Password=jh2501" Question 1: How to... (3 Replies)
Discussion started by: nazri76
3 Replies

3. Shell Programming and Scripting

grep question

hello people, All my servers have 4 mounts with this norme. For example, if my hostname is siroe. df -h | grep `hostname` /dev/dsk/c1t3d0s6 404G 399G 800M 100% /siroe3 /dev/dsk/c1t2d0s6 404G 399G 800M 100% /siroe2 /dev/md/dsk/d6 20G 812M 19G ... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

4. UNIX for Dummies Questions & Answers

grep question

Instead of using the following command #dmesg | grep -v sendmail | grep -v xntpd How can I use just one grep -v and give both arguments. Please suggest thanks (4 Replies)
Discussion started by: Tirmazi
4 Replies

5. Shell Programming and Scripting

grep question

Hello, Is there a way in grep to remember patterns? For eg: int a,b,c,d,a; If a variable is declared twice, like in the previous example, I should be able to print only those lines. Is there a way to print only the lines where the variable name occurs more than once, using grep... (1 Reply)
Discussion started by: prasanna1157
1 Replies

6. Shell Programming and Scripting

grep question please

i have files with "DOMAINSOLVER ACMS" with any number of spaces in between the two words on its own line and i can find it with the following: grep -c "DOMAINSOLVER* ACMS" $FILENAMEbut i need to exclude any lines matching: "$DOMAINSOLVER". i've tried a variety of quoting and escaping with no luck.... (4 Replies)
Discussion started by: crimso
4 Replies

7. Shell Programming and Scripting

Question about grep

can anyone tell me what the \/$ means? from grep \/$ (8 Replies)
Discussion started by: Nick1097
8 Replies

8. Shell Programming and Scripting

Question about grep

is there anyway i can ask grep to only get the first line? as in the top command line line 1 <-- just grep this line line 2 line 3 ---------- Post updated at 04:24 PM ---------- Previous update was at 04:19 PM ---------- nvm.. found out that i can do it with |head (12 Replies)
Discussion started by: Nick1097
12 Replies

9. UNIX for Dummies Questions & Answers

Question on grep

Hello all, I'm trying to grep the string "scott" from all files whose names are like srvr*.log and that were created "Nov 15"...I'm trying the following command but throws an error message...seems like the syntax is incorrect.. grep scott < ls -l srvr*.log|grep "Nov 15" Thanks for your... (9 Replies)
Discussion started by: luft
9 Replies

10. UNIX for Dummies Questions & Answers

Grep Question

My grep returns a row of data like this: 75=20130130;60=074338;61=985;511=55473883;452=115439;62=196;267=1; Is there a way for the grep to only return 60="something" and 511="something" ? Thanks in advance. (10 Replies)
Discussion started by: Carl2013
10 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 07:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy