On Mon, 21 Oct 2002 11:56:37 +0900, nobu.nokada / softhome.net wrote:
> 
> I assumed each part start with "Part" line.  If preceeding
> lines exist, replace '\A' with '^'.
> 
Thanks.   Apparently I did not understand the meaning of string -- I thought
it is part of a line.

Now it works great.   I do have another question:  My data files are named 
like 30.txt, 40.txt.  How can I generate files with name Cu30.txt, In30.txt?
Where is the arguement stored?  I guess I only need to substitute $1 with 
$1 + filename)

ruby -00lne 'open($1,"w"){|f|f.puts $_}if/\APart\s+(\S+)/' 30.txt

Dong