On Sat, 29 Apr 2006, Vim Visual wrote:
[snip]
I solved it like this:
:1,/received/d
:$?^\s*For subscribe options?,$d
:let @a=''
:g/hole\|relativistic\|LISA\|black\|supermassive\|intermediate/?^\s*astro-ph?,/^\s*astro-ph/-y
A
:%d
:put a
:1d
:%s!^\s*astro-ph/\(\d\+\)!http://xxx.lanl.gov/pdf/astro
The problem is that I have to tell vim to convert the end of line and
empty spaces into , and I do it like this:
I mean :
The problem is that I have to tell vim to convert the end of line and
empty LINES into , and I do it like this:
> when I run it I end up with an empty file... ?
Well, you should be able to trace through it by entering
each of the commands individually instead of sourcing the
file to see where things are going funky. Places matters
could go awry:
I solved it like this:
:1,/received/d
:$?^\s*For subscrib
cat file | vim -
What stands the "-" for?
It is a standard *nix convention of accepting stdin as the
source for the file (in this case, the output of cat). That
way, we never actually bung with the original file. If you
don't care if it gets hosed in the process, you can just do
Hi Tim,
somehow my email was partially deleted... ??
cat file | vim -
What stands the "-" for?
Then, clean up the stuff we don't want
1,/received/d
$?^\s*For subscribe options?,$d
to strip off the header and footer.
this worked out nicely
My first-pass solution will end
I am struggling with sed and gawk but I guess that it'd be possible to
employ vim in the command line (it's to make a script that will be
automatically launched every 24 hours) but I don't have any idea of
how to do it...
How could I select the blocks (see file ahead) of a text file (say
.txt
Hi,
I am struggling with sed and gawk but I guess that it'd be possible to
employ vim in the command line (it's to make a script that will be
automatically launched every 24 hours) but I don't have any idea of
how to do it...
How could I select the blocks (see file ahead) of a text file (say