Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Grep.Need help with finding the words which start at [A-K] letters in thesecond column of the table Post 302631689 by vaidastf on Friday 27th of April 2012 05:16:11 PM
Old 04-27-2012
Grep.Need help with finding the words which start at [A-K] letters in thesecond column of the table

Hi buddies ! I need some help with one grep command Smilie I have this table:

Code:
1       Petras          Pavardenis      1980            5
08      Linas           Bajoriunas      1970            10
3       Saulius         Matikaitis      1982            2
5       Mindaugas       Stulgis         1990            7
6       Rimas           Nasickis        1964            10
7       Simas           Saulenis        1966            12
8       Justas          Skukauskas      1995            9
9       Petras          Petronkus       1988            3
10      Zanas           Baltraitis      1990            5
11      Mantas          Kvedys          1974            1
12      Edmundas        Butkus          1970            9
13      Mindaugas       Sinkevicius     1945            11
14      Edgaras         Zvironas        1930            8
15      Vaidas          Gaubas          1985            12
16      Gintaras        Gintaitis       1980            5
17      Raigardas       Tautkus         1975            1
18      Darvydas        Tautkevicius    1925            12
19      Tomas           Cereska         1989            4
20      Saulius         Sidlauskas      1984            6
21      Jonas           Jonaitis        1966            8
22      Jonas           Petraitis       1940            12
23      Jonas           Ringys          1970            1
13      Julius          Jonaitis        1974            11

And i need to find the words which start with capital letters A,B,C,D,E,F,G,H,I,J,K in the column 3 (the first word of this column is "Pavardenis") . Not in all columns but just in the third column (as I said earlier the first word of this column is "Pavardenis"). And i must use only GREP command (I cannot use awk or other commands due to my school restrictions).

Last edited by vaidastf; 04-27-2012 at 06:18 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find capital letter names in a file without finding words at start of sentence

Hi, I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this? Thanks for your help. (1 Reply)
Discussion started by: kev269
1 Replies

2. Shell Programming and Scripting

extract words with even numbr of letters

Hello All I need to extract words which are of even number of letters and not greater than 10. Any help?? Thanks, Manish (3 Replies)
Discussion started by: manish205
3 Replies

3. Shell Programming and Scripting

need to delete lines that start with letters

Hi, I need to remove all lines from a file that do not start with numbers For instance, if the first three characters on any line are not numbers, delete those lines I've tried to do it with awk and it's not working, any ideas ? Thanks (5 Replies)
Discussion started by: sfisk
5 Replies

4. Shell Programming and Scripting

Need to add letters to a column and add in a new column subtracting from another column

So I have this input 1 10327 rs112750067 T C . PASS DP=65;AF=0.208;CB=BC,NCBI 1 10469 rs117577454 C G . PASS DP=2055;AF=0.020;CB=UM,BC,NCBI 1 10492 rs55998931 C T . PASS DP=231;AF=0.167;CB=BC,NCBI 1 10583 rs58108140 G A ... (3 Replies)
Discussion started by: kellywilliams
3 Replies

5. Shell Programming and Scripting

ENQUIRY WHETHER SCRIPT FOR DETECTING WORDS FROM A SET OF LETTERS EXISTS

Hello, I am interested in finding out whether someone has a perl or awk script which takes a set of letters such as wak and referring to a dictionary spews out all possible forms such as awk, kaw etc. If someone has such a script, could it be put up please. The script should handle Unicode. Many... (0 Replies)
Discussion started by: gimley
0 Replies

6. Shell Programming and Scripting

AWK count letters words

Hi All! can anyone help me with this code? I want to count words or letters in every line with if(count>20){else echo $myline} awk '/<script /{p=1} /<\/script>/{p=0; next}!p' index.html | while read myline; do echo $myline done Thank you !!! (3 Replies)
Discussion started by: sanantonio7777
3 Replies

7. Shell Programming and Scripting

Find and arrange words with same letters from list

I am making a word game and I am wondering how to find and arrange words in a list that have the same letters. In my game, you are presented with 5 letters, and you then have to rearrange the letters tp make a word. So the word could be "acorn", but those 5 letters could also make up "narco" or... (2 Replies)
Discussion started by: hellobard
2 Replies

8. Shell Programming and Scripting

How to words in arrange as Table

Hi Team, I have one file in that almost 100+ words in lines Eg:- Unix windows solaris Linux ... ... But I want arrange all lines in table format and can able read on screen Eg: - Unix windows solaris Lunix...... Hp unix Mac-os ...... Like as Table...... (11 Replies)
Discussion started by: Bhaskar Alagala
11 Replies

9. Shell Programming and Scripting

Grep/Awk on 1st 2 Letters in 2nd Column of File

Hi everyone. I need to change a script (ksh) so that it will grep on the 1st 2 letters in the second column of a 5 column file such as this one: 192.168.1.1 CAXY0_123 10ABFL000001 # Comment 192.168.1.2 CAYZ0_123 10ABTX000002 # Comment 192.168.2.1 FLXY0_123 11ABCA000001 ... (4 Replies)
Discussion started by: TheNovice
4 Replies

10. Shell Programming and Scripting

Find words containing small letters

Hello, I have a file containing different words. How can i print the words which contain at least one small letter, for example if i have: today TOMORROw 12345 123a next preViou5 no it should print the following: today TOMORROw 123a next preViou5 no Please use code tags as required... (5 Replies)
Discussion started by: JhonTheNewbie
5 Replies
SVK::Log::Filter::Grep(3)				User Contributed Perl Documentation				 SVK::Log::Filter::Grep(3)

SYNOPSIS
SVK::Log::Filter::Grep - search log messages for a given pattern DESCRIPTION
The Grep filter requires a single Perl pattern (regular expression) as its argument. The pattern is then applied to the svn:log property of each revision it receives. If the pattern matches, the revision is allowed to continue down the pipeline. If the pattern fails to match, the pipeline immediately skips to the next revision. The pattern is applied with the /i modifier (case insensitivity). If you want case-sensitivity or other modifications to the behavior of your pattern, you must use the "(?imsx-imsx)" extended pattern (see "perldoc perlre" for details). For example, to search for log messages that match exactly the characters "foo" you might use svk log --filter "grep (?-i)foo" However, to search for "foo" without regards for case, one might try svk log --filter "grep foo" The result of any capturing parentheses inside the pattern are not available. If demand dictates, the Grep filter could be modified to place the captured value somewhere in the stash for other filters to access. If the pattern contains a pipe character ('|'), it must be escaped by preceding it with a '' character. Otherwise, the portion of the pattern after the pipe character is interpreted as the name of a log filter. STASH
/PROPERTY MODIFICATIONS Grep leaves all properties and the stash intact. perl v5.10.0 2008-08-04 SVK::Log::Filter::Grep(3)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy