need help for a _very_ short prog. 
Author Message
 need help for a _very_ short prog.

Hi out there....

can u help me reaching the following :

Inputfile : lines with html-code :
<BODY>
<CENTER>
etc........

(wished) Output:

fprintf (fp, "<BODY>\n");
fprintf (fp, "<CENTER>\n");

I tried the follwoing but awk interprets the " and the \n : what can i
do ?

{ print "fprintf (fp," " $1 ">"\n);" }

Is it possible to use another char for " ?
How to make him not to interpret \n ?

Thx in advance.

cheers

Chris




Mon, 24 Feb 2003 22:46:55 GMT  
 need help for a _very_ short prog.
thats it :

{ print "fprintf (fp,\""  $0 "\\n\");" }

(for those who wish to know ;)

Chris

Quote:

> Hi out there....

> can u help me reaching the following :

> Inputfile : lines with html-code :
> <BODY>
> <CENTER>
> etc........

> (wished) Output:

> fprintf (fp, "<BODY>\n");
> fprintf (fp, "<CENTER>\n");

> I tried the follwoing but awk interprets the " and the \n : what can i
> do ?

> { print "fprintf (fp," " $1 ">"\n);" }

> Is it possible to use another char for " ?
> How to make him not to interpret \n ?

> Thx in advance.

> cheers

> Chris





Mon, 24 Feb 2003 23:02:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. long = short*short ; (short,short) = long/short

2. Short Term, Remote Non-Prog Smalltalk Project

3. Desparately need help to solve a prog Question !!

4. HELP needed on simple concat prog

5. simple f77 prog - need help

6. ----> Emergency: Need Help with fortran prog

7. Help needed with writing a short PROGRAM.

8. Need help with simple expect prog.

9. Need help porting MacLisp prog to CL

10. need help compile c prog w/

11. Need Help with Dijkstra's Shortest Path Algortithm

12. clarion prog as a cgi prog

 

 
Powered by phpBB® Forum Software