Gary Kline wrote:
On Mon, Dec 22, 2008 at 08:53:36AM +, Matthew Seaman wrote:
Gary Kline wrote:
anyway, this is one for giiorgos, or another perl wiz. i've
been using the perl subsitution cmd one-liner for years with
unfailing success. is there a way of deleting li
On Mon, Dec 22, 2008 at 08:53:36AM +, Matthew Seaman wrote:
> Gary Kline wrote:
>
> > anyway, this is one for giiorgos, or another perl wiz. i've
> > been using the perl subsitution cmd one-liner for years with
> > unfailing success. is there a way of deleting lines with perl
> >
Gary Kline wrote:
anyway, this is one for giiorgos, or another perl wiz. i've
been using the perl subsitution cmd one-liner for years with
unfailing success. is there a way of deleting lines with perl
using the same idea as:
perl -pi.bak -e 's/OLDSTRIN
On Monday 22 December 2008 00:27:44 Gary Kline wrote:
>
> anyway, this is one for giiorgos, or another perl wiz. i've
> been using the perl subsitution cmd one-liner for years with
> unfailing success. is there a way of deleting lines with perl
> using the same idea as:
>
>
On Mon, 22 Dec 2008 05:31:08 +0200, Giorgos Keramidas
wrote:
> On Sun, 21 Dec 2008 14:27:44 -0800, Gary Kline wrote:
> > perl -pi.bak -e 's/OLDSTRING/NEWSTRING/g' file1 file2 fileN
> >
> > that i swiped somewhere. [?]
> >
> > last night i was up until the wee hours coding or e
On Sun, 21 Dec 2008 14:27:44 -0800, Gary Kline wrote:
> perl -pi.bak -e 's/OLDSTRING/NEWSTRING/g' file1 file2 fileN
>
> that i swiped somewhere. [?]
>
> last night i was up until the wee hours coding or extending
> a c++ program to assist in this stuff. while i re
On Sun, Dec 21, 2008 at 03:06:58PM +0100, Bertram Scharpf wrote:
> Hi,
>
> Am Sonntag, 21. Dez 2008, 02:08:04 -0800 schrieb Gary Kline:
> > On Sun, 2008-12-21 at 07:42 +0200, Giorgos Keramidas wrote:
> > > On Sat, 20 Dec 2008 21:34:10 -0800, Gary Kline wrote:
> > > >
> > > > sed '8,10d'< file> ne
Hi,
Am Sonntag, 21. Dez 2008, 02:08:04 -0800 schrieb Gary Kline:
> On Sun, 2008-12-21 at 07:42 +0200, Giorgos Keramidas wrote:
> > On Sat, 20 Dec 2008 21:34:10 -0800, Gary Kline wrote:
> > >
> > > sed '8,10d'< file> newfile
> > > or is there a better way?
> >
> > keram...@kobe:/tmp$ sed -i ''
On Sun, 2008-12-21 at 07:42 +0200, Giorgos Keramidas wrote:
> On Sat, 20 Dec 2008 21:34:10 -0800, Gary Kline wrote:
> > how can i delete, say, lines 8,9,and 10 from 200 files
> > using sed? Is it
> >
> > sed '8,10d'< file> newfile
> > or is there a better way?
>
> Use in-place editing:
>
> ke
Gary Kline wrote:
how can i delete, say, lines 8,9,and 10 from 200 files
using sed? Is it
sed '8,10d'< file> newfile
or is there a better way?
I'd stick it in a for loop using inplace editing, but yes. :-)
___
fre
On Sat, 20 Dec 2008 21:34:10 -0800
Gary Kline wrote:
> or is there a better way?
>
nothing specific to add for your particular issue, but this link may
be useful in the future for sed:
http://sed.sourceforge.net/grabbag/tutorials/
--
In friendship,
prad
..
On Sat, 20 Dec 2008 21:34:10 -0800, Gary Kline wrote:
> how can i delete, say, lines 8,9,and 10 from 200 files
> using sed? Is it
>
> sed '8,10d'< file> newfile
> or is there a better way?
Use in-place editing:
keram...@kobe:/tmp$ cat -n foo
1 foo
2 bar
3 baz
keram..
On 2007-09-25 22:49, Pollywog <[EMAIL PROTECTED]> wrote:
> On Tuesday 25 September 2007 22:21:48 Giorgos Keramidas wrote:
> > A word of caution there...
> >
> > If you plan to use GNU/Linux manpages for learning sed(1) be _very_
> > cautious for GNU/Linux-specific parts. There are subtle, yet
> >
On Tuesday 25 September 2007 22:21:48 Giorgos Keramidas wrote:
>
> A word of caution there...
>
> If you plan to use GNU/Linux manpages for learning sed(1) be _very_
> cautious for GNU/Linux-specific parts. There are subtle, yet possibly
> important differences between GNU/Linux sed and BSD sed.
On Wed, Sep 26, 2007 at 01:21:48AM +0300, Giorgos Keramidas wrote:
> On 2007-09-25 11:28, Gary Kline <[EMAIL PROTECTED]> wrote:
> > Thank you! This will help me de-code that sed one-liner that was
> > evidently written by a sedexpert. The linux pages help further, but
> > I've found some soild tut
On 2007-09-25 11:28, Gary Kline <[EMAIL PROTECTED]> wrote:
> Thank you! This will help me de-code that sed one-liner that was
> evidently written by a sedexpert. The linux pages help further, but
> I've found some soild tutorials.
Hi Gary.
A word of caution there...
If you plan to use GNU/Lin
On Tue, Sep 25, 2007 at 08:50:57PM +0300, Nikos Vassiliadis wrote:
> Gary,
>
> This will probably help you, it has many nice one-liners.
>
> http://sed.sourceforge.net/grabbag/tutorials/sed1line.txt
>
> Nikos
Aww, you found my stash:) But as I said, up-queue, I'm
overdue to u
On Tue, Sep 25, 2007 at 08:38:50PM +0300, Nikos Vassiliadis wrote:
> On Tuesday 25 September 2007 19:58, Gary Kline wrote:
> > But trying to parse this from man sed is more than
> > difficule. And I have yet to find "ba" in the man page. That is
> > why I asked for some insights rathe
Gary,
This will probably help you, it has many nice one-liners.
http://sed.sourceforge.net/grabbag/tutorials/sed1line.txt
Nikos
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe,
On Tuesday 25 September 2007 19:58, Gary Kline wrote:
> But trying to parse this from man sed is more than
> difficule. And I have yet to find "ba" in the man page. That is
> why I asked for some insights rather that to be told to "go read
> the man page"; to me, that's di
On Tue, Sep 25, 2007 at 01:05:06PM -0400, Howard Goldstein wrote:
>
>
> Giorgos Keramidas wrote:
> > On 2007-09-24 20:52, Gary Kline <[EMAIL PROTECTED]> wrote:
> >
> >> On Mon, Sep 24, 2007 at 11:07:20PM -0400, Howard Goldstein wrote:
> >>
> # delete the last 10 lines of a file
> >>
On Tue, Sep 25, 2007 at 07:24:25PM +0300, Giorgos Keramidas wrote:
> On 2007-09-24 20:52, Gary Kline <[EMAIL PROTECTED]> wrote:
> >On Mon, Sep 24, 2007 at 11:07:20PM -0400, Howard Goldstein wrote:
> >>> # delete the last 10 lines of a file
> >>> sed -e :a -e '$d;N;2,10ba' -e 'P;D' # method 1
>
Giorgos Keramidas wrote:
> On 2007-09-24 20:52, Gary Kline <[EMAIL PROTECTED]> wrote:
>
>> On Mon, Sep 24, 2007 at 11:07:20PM -0400, Howard Goldstein wrote:
>>
# delete the last 10 lines of a file
sed -e :a -e '$d;N;2,10ba' -e 'P;D' # method 1
sed -n -e :a -e '1,10!{P;
On Tue, Sep 25, 2007 at 09:31:04AM +0300, Nikos Vassiliadis wrote:
> On Tuesday 25 September 2007 06:07, Howard Goldstein wrote:
> > Gary Kline wrote:
> > > My earlier post about deleting the first N lines was answered by
> > > this one-liner site {below}. I wasn't including any
> > > redir
On 2007-09-24 20:52, Gary Kline <[EMAIL PROTECTED]> wrote:
>On Mon, Sep 24, 2007 at 11:07:20PM -0400, Howard Goldstein wrote:
>>> # delete the last 10 lines of a file
>>> sed -e :a -e '$d;N;2,10ba' -e 'P;D' # method 1
>>> sed -n -e :a -e '1,10!{P;N;D;};N;ba' # method 2
>>>
>>> Question t
On Tuesday 25 September 2007 06:07, Howard Goldstein wrote:
> Gary Kline wrote:
> > My earlier post about deleting the first N lines was answered by
> > this one-liner site {below}. I wasn't including any
> > redirection; doing so finally resolved the problem. Now I need
> > to d
On Mon, Sep 24, 2007 at 11:07:20PM -0400, Howard Goldstein wrote:
> Gary Kline wrote:
> > My earlier post about deleting the first N lines was answered by
> > this one-liner site {below}. I wasn't including any
> > redirection; doing so finally resolved the problem. Now I need
> >
Gary Kline wrote:
> My earlier post about deleting the first N lines was answered by
> this one-liner site {below}. I wasn't including any
> redirection; doing so finally resolved the problem. Now I need
> to delete every line from the 19th or so to the last line.
>
On 2007-09-24 14:07, Gary Kline <[EMAIL PROTECTED]> wrote:
> Hi,
> I could probably do at least part of this with an ed shell
> script, but sed is probaly more standard. (I may have asked this
> before, years back: FWIW. Anyhow, don't see it in my
> ~/Mail/freebsd files.)
>
> How can I automagica
29 matches
Mail list logo