[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grep for colums?



Nagy Daniel wrote:
>
> the "text" is here:
>
> http://pastebin.com/f37214a30
>
> and I only want this string:
>
> http://downloads.sourceforge.net/portableapps/nvu_portable_1.0_rev_5_en-us.paf.exe?download
>
> so I want to search like:
> | grep downloads.sourceforge.net <http://downloads.sourceforge.net> |
> grep nvu
> but the text isn't separated with enters, and I want to search in
> columns, not in rows :S
>

So, its an one liner. Suppose your text is inside file 'datext'.

Give:

cat datext | perl -e '$line = <>; @f = split(/\"/, $line); print $f[9];'

and you'll get your precious...

G.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: