bergman on 31 Aug 2010 09:54:11 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Sed or awk help?!


The pithy ruminations from linc <linc@lincgeek.org> on "Re: [PLUG] Sed or awk help?!" were:

	[SNIP!]

=> 
=> Actually what he said was:
=> "I have a file 1.7 million lines long..
=> It contains nothing but filenames with a .CEL extension.."

True.

=> 
=> That doesn't necessarily mean it's one filename per line right?  Global 

OK.

In that case, I'd want a more complete specification of the input file (ie., what separator[s] are used between filenames).

One solution may be:

	sed -e "s/\.CEL%/%/g" 
if the delimiter was "%". Another possibility would be to try to enumerate a class of characters that are NOT the delimiters. For example, if
alpha-numeric characters were NOT the delimiters between filenames, you might use:

	sed -e "s/\.CEL\([^A-Za-z0-9]\)/\1/g"

Mark

=> seemed to be the best choice to "get 'em all" I guess..
=> 
=> :)
=> 
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug