The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Surrounding a chunk of code by #ifdef and #endif
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Surrounding a chunk of code by #ifdef and #endif
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
7
(
permalink
)
05-09-2007
aigles
Registered User
Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,212
From ghostdog74's solution :
Code:
awk '/^MyFunc/{ print "#ifdef JUST_DONT" print getline print print "#endif" next } 1 ' file
Jean-Pierre.
aigles
View Public Profile
Find all posts by aigles