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 <> on "Re: [PLUG] Sed or awk help?!" were:


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


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


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"


=> seemed to be the best choice to "get 'em all" I guess..
=> :)
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --