awk returns 0 when file rewriten 
Author Message
 awk returns 0 when file rewriten



I've got a programm that runs in two different modes. One dummy mode and
an expert mode. In the expert mode it reads a file and view it in a html
- textarea. Now you can edit it and write it back. In the dummie mode
you've got only options you can click. There is one option you can
delete an entry of the file. When you click the delete button a
c-programm uses awk to get the linenumber of the entry. The c programm
write a tempfile without the line which it get back of the awk -


When I use the dummie mode to delete an entry it's allright, but when I
change the file with the expert mode and want to use the dummie - delete
later awk returns line 0 everytime. The file looks after saving in the
expert - mode in the same way like before. ( no loosing of newline, tabs
or '\0').


What are the arguments a file must have to be parsed by awk ? How can I
make my programm running ?

Hope you can help me


Thanx a lot and save the whales

Tue, 31 Dec 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Outputting info from awk and using the info to name the awk output file

2. return multiple values from an awk function?

3. Return value from awk snipet via korn shell subroutine

4. returning a value from awk

5. Q: Reading Return Value from AWK Program

6. Return a unique file file name - function??

7. Return a unique file file name - function??

8. How to transform .obj file return to .prg file

9. Replacing a string from an input file within awk script

10. Copy files using AWK's output

11. Newbie question -- to make an awk program act on a collection of files

12. cannot run .awk files in dos


Powered by phpBB® Forum Software