Dirk Laurie on Wed, 15 Oct 2003 12:10:17 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: write in a file |
Markus Endres skryf: > > the unix shell command 'sed' works fine with the parigp command > 'extern'. > > so you can do something like this in gp > > getline(n) = > { > return(extern("sed -n "n"p file")); > } > > > where n is the number of the line you want to read from the file 'file'. > > now you have only to write a for-loop which runs from the first line you > want to the last one. ok, you must know the number of lines in the file, > but if you wrote the file with 'write()', thats easy. > I can use this one. Very clever! Dirk