Re: sed help

2009-06-17 Thread Giorgos Keramidas
On Wed, 17 Jun 2009 10:55:28 -0700 (PDT), chloe K wrote: > Hi > I have a file. list.txt (two columns) >   > column1    column2 > name    address >   > I need to put in the letter file letter.txt eg: >   > Dear: Chloe > Address: CA >   > Can I use this >   > for i `cat list.txt` | sed 's/Chloe/

Re: sed help

2009-06-17 Thread Dan Nelson
In the last episode (Jun 17), chloe K said: > I have a file. list.txt (two columns) >   > column1    column2 > name    address >   > I need to put in the letter file letter.txt eg: >   > Dear: Chloe > Address: CA >   > Can I use this >   > for i `cat list.txt` | sed 's/Chloe/$i.1; /CA/$i.2/g'

sed help

2009-06-17 Thread chloe K
Hi     I have a file. list.txt (two columns)   column1    column2 name    address     I need to put in the letter file letter.txt eg:   Dear: Chloe Address: CA   Can I use this   for i `cat list.txt` | sed 's/Chloe/$i.1; /CA/$i.2/g' $i.letter.txt   Thank you for your help ___

Re: Sed Help.....

2004-11-16 Thread Loren M. Lang
On Thu, Nov 11, 2004 at 08:12:55AM +0200, Giorgos Keramidas wrote: > On 2004-11-10 15:15, Rod Person <[EMAIL PROTECTED]> wrote: > > On Wednesday 10 November 2004 7:58 pm, mailing lists at MacTutor wrote: > > > Take a look at what the shell replacement is actually doing. If you > > > were to write t

Re: Sed Help.....

2004-11-10 Thread Giorgos Keramidas
On 2004-11-10 15:15, Rod Person <[EMAIL PROTECTED]> wrote: > On Wednesday 10 November 2004 7:58 pm, mailing lists at MacTutor wrote: > > Take a look at what the shell replacement is actually doing. If you > > were to write the line manually it would look like this: > > > > sed -e 's/\/usr\X11R6\/bi

Re: Sed Help.....

2004-11-10 Thread Chuck Robey
On Thu, 11 Nov 2004, Svein Halvor Halvorsen wrote: > > [Rod Person, 2004-11-10] > > Here is the relavent code: > > > > KDMLINE="/usr/local/bin/kdm -nodaemon" > > REPLACELINE="/usr/X11R6/bin/xdm -nodaemon" > > > > sed -e "s/$REPLACELINE/$KDMLINE/g" /etc/test/ttys > /etc/test/new > >

Re: Sed Help.....

2004-11-10 Thread Svein Halvor Halvorsen
[Rod Person, 2004-11-10] > Here is the relavent code: > > KDMLINE="/usr/local/bin/kdm -nodaemon" > REPLACELINE="/usr/X11R6/bin/xdm -nodaemon" > > sed -e "s/$REPLACELINE/$KDMLINE/g" /etc/test/ttys > /etc/test/new > > Here is the error I'm getting: > sed: 1: "s//usr/X11R6

Re: Sed Help.....

2004-11-10 Thread Volker Eckert
On Wed, Nov 10, 2004 at 02:43:01PM +, Rod Person wrote: > > KDMLINE="/usr/local/bin/kdm -nodaemon" > REPLACELINE="/usr/X11R6/bin/xdm -nodaemon" > > sed -e "s/$REPLACELINE/$KDMLINE/g" /etc/test/ttys > /etc/test/new > > Here is the error I'm getting: > sed: 1: "s//usr/X11R6/bin

Re: Sed Help.....

2004-11-10 Thread Rod Person
On Wednesday 10 November 2004 7:58 pm, mailing lists at MacTutor wrote: > Rod, > > Take a look at what the shell replacement is actually doing. If you > were to write the line manually it would look like this: > > sed -e 's/\/usr\X11R6\/bin\/xdm/\/usr\/local\/bin\/kdm/g' ... > > Right? > > But the

Re: Sed Help.....

2004-11-10 Thread Miguel Mendez
On Wed, 10 Nov 2004 14:43:01 + Rod Person <[EMAIL PROTECTED]> wrote: Hi, > KDMLINE="/usr/local/bin/kdm -nodaemon" > REPLACELINE="/usr/X11R6/bin/xdm -nodaemon" > > sed -e "s/$REPLACELINE/$KDMLINE/g" /etc/test/ttys > /etc/test/new > > Here is the error I'm getting: > sed: 1: "

Re: Sed Help.....

2004-11-10 Thread mailing lists at MacTutor
Rod, Take a look at what the shell replacement is actually doing. If you were to write the line manually it would look like this: sed -e 's/\/usr\X11R6\/bin\/xdm/\/usr\/local\/bin\/kdm/g' ... Right? But the shell doesn't escape the path separators (slashes). You need to escape them yourself in t

Sed Help.....

2004-11-10 Thread Rod Person
I trying to write a script that will make it easier for a friend that I finally talked into trying Freebsd setup a desktop. This part of the script is suppose to change the line in the ttys file to allow kdm to start on boot. Here is the relavent code: KDMLINE="/usr/local/bin/kdm -nodaemon

Re: OT sed help

2002-09-19 Thread Matthew Bettinger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the solution. Informix fun fun ... Matt On Thursday 19 September 2002 02:40 pm, Oliver Fromme wrote: > Matthew Bettinger <[EMAIL PROTECTED]> wrote: > > I have a flat file that I need to import into a database. The first > > field of

Re: OT sed help

2002-09-19 Thread Oliver Fromme
Matthew Bettinger <[EMAIL PROTECTED]> wrote: > I have a flat file that I need to import into a database. The first field of > the file is a part number which cannot exceed more than 8 characters. > > Does anyone know how I can use sed to count the characters in the first field > and if t

Re: OT sed help

2002-09-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-09-19 09:38:33 -0500: > I have a flat file that I need to import into a database. The first > field of the file is a part number which cannot exceed more than 8 > characters. > > Does anyone know how I can use sed to count the characters in the > first field and if th

RE: OT sed help

2002-09-19 Thread Barry Byrne
btsystems.com > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Matthew > Bettinger > Sent: 19 September 2002 15:39 > To: [EMAIL PROTECTED] > Subject: OT sed help > > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > >

Re: OT sed help

2002-09-19 Thread Matt Smith
Try these Use this if part numbers are numeric only. cat my_flat_file | sed /"^[0-9]\{8\}[^0-9].*$"/d Use this if part numbres are alpha-numeric, and columns are seperated by whitespace cat my_flat_file | sed /"^[0-9a-zA-Z]\{8\}.*$"/d These will both simply delete(from view, not from the fil

OT sed help

2002-09-19 Thread Matthew Bettinger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I know this is off topic however I hope someone can help. I have a flat file that I need to import into a database. The first field of the file is a part number which cannot exceed more than 8 characters. Does anyone know how I can use se