Re: [SLUG] sed question

2006-04-02 Thread jam
On Monday 03 April 2006 08:25, [EMAIL PROTECTED] wrote: > Simon> On Fri, 31 Mar 2006, Steven Heimann wrote: > >> **1. Scope** > >> > >> I wrote the following > >> > >> sed -i.bak "s/^\(\*\*[0-9][. ]\)\*\*\(.*\)$/\1\2**/" *.txt > > The $ will be interpreted by the shell, because it's in double > quo

Re: [SLUG] sed question

2006-04-02 Thread Peter Chubb
> "unauthorized" == unauthorized <[EMAIL PROTECTED]> writes: unauthorized> On Sun, 2 Apr 2006 17:31:33 +1000 Peter Chubb unauthorized> <[EMAIL PROTECTED]> wrote: >> > "Simon" == Simon Bowden <[EMAIL PROTECTED]> writes: >> Simon> On Fri, 31 Mar 2006, Steven Heimann wrote: >> >> **1. Scop

Re: [SLUG] sed question

2006-04-02 Thread unauthorized
On Sun, 2 Apr 2006 17:31:33 +1000 Peter Chubb <[EMAIL PROTECTED]> wrote: > > "Simon" == Simon Bowden <[EMAIL PROTECTED]> writes: > > Simon> On Fri, 31 Mar 2006, Steven Heimann wrote: > >> **1. Scope** > >> > >> I wrote the following > >> > >> sed -i.bak "s/^\(\*\*[0-9][. ]\)\*\*\(.*\)$/\1\2

Re: [SLUG] sed question

2006-04-01 Thread Peter Chubb
> "Simon" == Simon Bowden <[EMAIL PROTECTED]> writes: Simon> On Fri, 31 Mar 2006, Steven Heimann wrote: >> **1. Scope** >> >> I wrote the following >> >> sed -i.bak "s/^\(\*\*[0-9][. ]\)\*\*\(.*\)$/\1\2**/" *.txt The $ will be interpreted by the shell, because it's in double quotes. Depend

Re: [SLUG] sed question

2006-03-30 Thread Simon Bowden
On Fri, 31 Mar 2006, Steven Heimann wrote: **1. Scope** I wrote the following sed -i.bak "s/^\(\*\*[0-9][. ]\)\*\*\(.*\)$/\1\2**/" *.txt Unfortunately sed seems to be putting the 2 trailing ** at the beginning of the replacement line rather than the end of the line and after much stuffing aro

Re: [SLUG] sed question

2006-03-30 Thread jam
On Friday 31 March 2006 08:50, [EMAIL PROTECTED] wrote: > I have a bunch of test files with lines of the form > > **1.** Scope > > or > > **2.2** Uniforms and other clothing worn in the production area must be > laundered regularly. Additional clothing changes may be required when > significant soi

Re: [SLUG] sed question

2006-03-30 Thread Matthew Hannigan
On Fri, Mar 31, 2006 at 11:29:40AM +1100, Steven Heimann wrote: > Unfortunately sed seems to be putting the 2 trailing ** at the beginning > of the replacement line rather than the end of the line and after much > stuffing around I still can't work out what is going wrong. Works for me: echo '**1

[SLUG] sed question

2006-03-30 Thread Steven Heimann
I have a bunch of test files with lines of the form **1.** Scope or **2.2** Uniforms and other clothing worn in the production area must be laundered regularly. Additional clothing changes may be required when significant soiling occurs, especially when involved in 'dirty' cleaning or maintena

Re: [SLUG] Sed question

2002-11-06 Thread Matthew Hannigan
On Thu, Nov 07, 2002 at 12:40:02PM +1100, Andrew Wilson wrote: > I,e : i want to capture all the text between the word "start" and the word > "end" even if it spans numerous lines. Here ya go $ cat t dog cat start flower nice end co

Re: [SLUG] Sed question

2002-11-06 Thread Broun, Bevan
You will find the answer at the seder grab bag http://spazioinwind.libero.it/seders/ go to the tutorial and then the one liners. I think you want sed -n '/start/,/end/p' on Thu, Nov 07, 2002 at 12:40:02PM +1100, Andrew Wilson <[EMAIL PROTECTED]> wrote: > > Hi guys, > I hopefully have an ea

[SLUG] Sed question

2002-11-06 Thread Andrew Wilson
Title: Sed question Hi guys, I hopefully have an easy sed question for the poor souls that have mastered sed. All i need is the sed command with paramaters that will pull out everyline between 2 points. I,e : i want to capture all the text between the word "start" and the word "end" even i

Re: [SLUG] Sed Question

2000-08-23 Thread Ken Yap
>Sluggers > >This is driving me nuts, I've doen this before and do you think I can >drag the command out of my memory! What's the syntax in sed that puts >the wild card expresion matched in the first side of the substitute back >in on the replace side? > >EG > > echo " Hello To The World,\nGday

Re: [SLUG] Sed Question

2000-08-23 Thread Russell Davies
; This is driving me nuts, I've doen this before and do you think I can ; drag the command out of my memory! What's the syntax in sed that puts ; the wild card expresion matched in the first side of the substitute back ; in on the replace side? I believe you're thinking of '&'. r. -- SLUG - Sy

[SLUG] Sed Question

2000-08-23 Thread Peter Rundle
Sluggers This is driving me nuts, I've doen this before and do you think I can drag the command out of my memory! What's the syntax in sed that puts the wild card expresion matched in the first side of the substitute back in on the replace side? EG echo " Hello To The World,\nGday to Oz,\nHi