From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Neil Holmes" Subject: RE: ash and String Manipulation Date: Tue, 7 Jan 2003 11:02:30 -0000 Sender: linux-8086-owner@vger.kernel.org Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii" To: jb1@btstream.com Cc: Linux 8086 I have replaced much of the "toy" code now with a c program. Thanks for the tip though. Neil -----Original Message----- From: jb1@btstream.com [mailto:jb1@btstream.com] Sent: 07 January 2003 11:04 To: Neil Holmes Cc: Linux 8086 Subject: RE: ash and String Manipulation On Mon, 6 Jan 2003, Neil Holmes wrote: > Thanks for this. I am now working on alternative ways. > > Looks like I am having to flex my not-so-advanced 'C' skills ! Its going > well though. I'm sure your example was just a "toy", but maybe you can simply use "sed" to substitute a spaces for each commas, e.g.: echo "advent,Text Adventure Game,advent.tar" | sed 's/,/ /g' I've hardly used the command at all, but I know it's a great deal more flexible (and cryptic!) than the example above implies. Unfortunately, the man and info pages are insufficient, but I've collected some more useful documentation. Let me know if you want that information. ELKS doesn't seem to have "sed", but should (hint, hint). There's a message in the archives at http://linmodems.org from Jeff Chua dated Thu, 2 Jan 2003 08:35:50 +0800 (SGT) in which he has identical text substitutions using "sed" and "ex". The "vi" in my RedHat 7.0 is actually "vim" and has a command-line switch, "-e", that's supposed to start it in "ex" mode. ELKS has "vi", but it doesn't recognize the "-e" switch; maybe it would be easier to add that function than to convert "sed" for ELKS.