Re: little bit of a nudge with grep, please?

From: Dylan Griffiths <dylang_at_no.spam.please>
Date: Thu Jul 13 2006 - 19:34:15 CST

Dave Hall wrote:
>>grep -R ?????? /home/jimw/Desktop/Conput.rtf > /home/jimw/Desktop/???.rtf
>>
>>What I'd like for it to do as well is to output the stuff with an extra
>>line in between items.
>>Is that feasible? Is there a URL that can tell me everything (not just
>>the man page)?
>
>
> You could pipe it through sed or awk to insert an extra newline (\n):
>
> grep [-R] word infile | awk '{ print $0"\n"}' > outfile
>
> Basically put
> | awk '{ print $0"\n"}'
> just in front of the > that redirects the output to a file.
>

Yes, Dave is correct. What you're going to find, Jim, is that there are
a great number of neat little text utilities like this that do one or
two things, but they do them well. If you can understand the semantics
of how to stick them together with our friend the | character (which are
also called pipes), you'll be able to do lots of things that OpenOffice
or MS Word can't do (or could do, but is hidden away in a menu) :)

The good ones to know (IME) are grep, awk (which is nice, because you
tell awk what to use to split on, and can stick in other formatting
characters, or even swap orders of columns/words, all in text!), perl,
sort, and wc. Together, these can do pretty much anything a word
processor can do, just without the menu part :)

I hope you share some of what you do find with the list regarding
conjugations.
Received on Thu Jul 13 19:32:18 2006

This archive was generated by hypermail 2.1.8 : Fri Sep 08 2006 - 23:26:38 CST