[Solved] Text manipulation help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Text manipulation help
# 1  
Old 12-17-2012
[Solved] Text manipulation help

Hello Unix.com

How can I sort from a large email list only the emails that finish with .ca domain?

cat <list> | grep "\.ca\b" >> <new list> isnt working perfectly.

Any tips?

Best regards, Galford D. Weller

Last edited by Scott; 12-17-2012 at 11:39 AM.. Reason: Code tags
# 2  
Old 12-17-2012
If it IS a list --
meaning the output is on a single line for each email:
Code:
awk '/\.ca$/' filename > newfilename

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 12-17-2012
Indeed its line-by-line.

I will give it a go and come back with result.

Thanks.

---------- Post updated at 10:43 AM ---------- Previous update was at 10:38 AM ----------

Working. Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Text Manipulation Help

Hello again unix.com, I have a text file in this format (line-by-line): hostname id password hostname id password hostname id password hostname id password I want it to become: hostname id password hostname id password hostname id password hostname id password (4 Replies)
Discussion started by: galford
4 Replies

2. UNIX for Dummies Questions & Answers

Text manipulation help

Hello unix.com I'm having trouble with a text file. It looks like this: Alvaro Costa Daldit Kaur Sings Brian G Heward Desmond Ogilvie John Der William Gherasim Lance Mackey Donald Kopplin Robert Mckinlay Jahir Hussain Mohamed Jack Benaim Abraham Weiss I want... (7 Replies)
Discussion started by: galford
7 Replies

3. Shell Programming and Scripting

[Solved] Data manipulation

Hallo Team, I need your help. I have a file that has two colums. See sample below: 105550 0.28 105550 0.24 125550 0.28 125550 0.24 215650 0.28 215650 0.24 315550 0.28 315550 0.24 335550 0.28 335550 0.24 40555 0.21 40555 0.17 415550 0.21 415550 0.17 43555 0.21 43555 0.17 (5 Replies)
Discussion started by: kekanap
5 Replies

4. Shell Programming and Scripting

[Solved] awk manipulation of sequentially named files

Hello, I am a very novice user of awk, I have a set of files named file001, file002, file003, file004, etc., each contains four fields (columns of data) separated each by a uneven number of spaces. I want to substitute those spaces by a TAB, so I am using this line of awk script: awk -v OFS="\t"... (4 Replies)
Discussion started by: jaldo0805
4 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Column manipulation

Hi Everyone, I was wondering if someone could help me to transform my data into a format I need. Here is an example of what my data looks like E F G H A 1 2 3 4 B 5 6 7 8 C 9 1 2 3 D 4 5 6 7 and this is what I would need it to look like: AE 1 BE 5 CE 9 DE 4 AF 2 BF 6 CF 1 (6 Replies)
Discussion started by: zajtat
6 Replies

6. UNIX for Dummies Questions & Answers

text manipulation help

Hello again unix.com How can I extract from a large file in format: steve@aol.com steve hawkins Location of this member is bla bla bla sun@hotmail.com Sun Ying This member is using browser bla bla bla to another text in format: steve@aol.com steve hawkins sun@hotmail.com sun ying ... (5 Replies)
Discussion started by: galford
5 Replies

7. UNIX for Dummies Questions & Answers

Text Manipulation Help

Hello unix.com, How can I sort a email list by domain name? Example how can I save only ".net" emails from a file? (1 Reply)
Discussion started by: galford
1 Replies

8. Shell Programming and Scripting

Text Manipulation Help

Hello unix.com people! How can I modify a text in format: A:B:C A:B:C A:B:C into C/A/B C/A/B C/A/B Note: Text is line by line and "C", "B", "A" fields are different each row. Thanks in advance. (7 Replies)
Discussion started by: galford
7 Replies

9. UNIX for Dummies Questions & Answers

text manipulation

I am tryin to figure out how to extract interested text from file example.txt blah blah blah a: child1 blah a: child2 blah b: parent1 blah blah blah .... blah a: child21 blah a: child22 blah a: child23 blah b: parent2 this kinda text repeats .. number of children is... (6 Replies)
Discussion started by: rajkishore
6 Replies

10. Shell Programming and Scripting

Text Manipulation.

Hi I have only ever used awk and sed for basic requirements up until now. I have had to break a log down for multiple purposes. Using awk, sed and a date script. I am left with this: (message id, time of msg attempt, message id, domain name, time of msg completion) ... (4 Replies)
Discussion started by: Icepick
4 Replies
Login or Register to Ask a Question