This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sed command garbled when generating macro_list on Solaris
- From: Paul Eggert <eggert at CS dot UCLA dot EDU>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Mar 2006 23:14:57 -0800
- Subject: Re: sed command garbled when generating macro_list on Solaris
- References: <87zmjlotn9.fsf@penguin.cs.ucla.edu> <jeveu9vsxo.fsf@sykes.suse.de>
Andreas Schwab <schwab@suse.de> writes:
> Paul Eggert <eggert@CS.UCLA.EDU> writes:
>> - sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \
>> - s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
>> + sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p; s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
>
> Would it be portable to use multiple -e options? That way the long line
> could be avoided.
Yes, as far as I know. (I used the long line only to avoid nitpicking
questions about whether -e is portable. :-)