In message <[EMAIL PROTECTED]> on Tue, 24 Dec 2002 09:23:47 -0800 (PST), Tim Rice <[EMAIL PROTECTED]> said:
tim> On Mon, 23 Dec 2002, Andy Polyakov wrote: tim> tim> > But in either case I was actually thinking about something like this: tim> > tim> > ... sed -e 's/ +\([\.,:@]\) +/\1/g' -e 's/#.*//' ... tim> tim> Doesn't work here. tim> Ie. doesn't do what ... sed -e 's/\. /./g' -e 's/@ /@/' ... did. It's probably because your sed is as lossy as mine, and doesn't grok +. For some examples you've shown before, the following gives the desired result: sed -e 's/ \?\([\.,@]\) */\1/g' -e 's/ *:/:/g' -e 's/#.*//' Note that it doesn't take away more than one leading space, because, as far as I understand, some dotted commands might otherwise fail because they end up in column 0. The leading space must be made of type '0 or 1' since two consecutive characters that need to be de-spacified wouldn't get completely processed. The colon is treated separately, as it's commonly an ending delimiter rather than an in-the-middle character, and at last the filter of comments... Results on a few lines you presented in an earlier mail (consecutive pairs of input and output): . type md5_block_asm_host_order , @ function .type md5_block_asm_host_order,@function . size md5_block_asm_host_order , . L_md5_block_asm_host_order_end - md .size md5_block_asm_host_order,.L_md5_block_asm_host_order_end - md Appro, would the above sed fit your requirements? -- Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED] Redakteur@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 \ SWEDEN \ or +46-708-26 53 44 Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]