|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hey guys,
I have a 15Mb text file, has around 170,000 lines in it. I want to be able to search the file for a specific word e.g. Kura and have every line that has the word Kura in inserted into a new file. Can anyone help me? Thanks in advance. |
|
#2
|
|||
|
|||
|
something like
Code:
grep Kura file > newfile |
|
#3
|
|||
|
|||
|
Ok now I feel liek a total nub.
Thankyou for that, didn't realise it was so easy. |
|
#4
|
||||
|
||||
|
If you want to match the word 'Kura' and not 'Kuramanga' etc. you should use something like:
Code:
grep '\<Kura\>' file > newfile |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Using awk to take lines from a 15Mb file and place in a new file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|