sed example

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sed example

patrick
I would need an example with sed command which do the next:
parse a input file and write in a file all what performs the pattern:

typedef [int or char or float or double or long or short]  ;

I would say that return every line from a file which is a typedef for a type;
Has anyone any idea?
Reply | Threaded
Open this post in threaded view
|

Re: sed example

Paul Smith-20
On Sat, 2014-05-31 at 14:24 -0700, patrick wrote:
> I would need an example with sed command which do the next:
> parse a input file and write in a file all what performs the pattern:
>
> typedef [int or char or float or double or long or short]  ;
>
> I would say that return every line from a file which is a typedef for a
> type;

This question isn't really related to GNU make.


_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make
Reply | Threaded
Open this post in threaded view
|

Re: sed example

Mason-32
In reply to this post by patrick
On 31/05/2014 23:24, patrick wrote:

> I would need an example with sed command which do the next:
> parse a input file and write in a file all what performs the pattern:
>
> typedef [int or char or float or double or long or short]
>
> I would say that return every line from a file which is a typedef
> for a type;

grep(1) seems more appropriate for that use-case.

_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make