Afficher un message
Vieux 29/04/2008, 06h15   #5
Dan Stromberg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commands to manipulate files

On Mon, 28 Apr 2008 06:07:31 -0700, Nezhate wrote:

> Hi all,
> I'm writing a small shell program that takes a file as input and print
> result in another file.
> I'm searching for command that can extract data which is between two
> asterisks.
> The next file shows what I mean:
>
> -----------------------------------
> in this file *I want to print only this* and *this* Linux is the *best
> operating* system! end of *this* file
> -----------------------------------------
>
> It's clear that a search for character * must be done in each line
> contained in file , when reached, data is written in the another file
> until it reaches the second asterisk, then it stops to write data and
> pass to the next line and so on.


What needs to happen with malformed input? Specifically, what needs to
happen with a line that has an odd number of *'s?

  Réponse avec citation
 
Page generated in 0,04813 seconds with 9 queries