Rich Shepard wrote:
> On Tue, 22 Feb 2011, Rich Shepard wrote:
>
>   
>>   Is there a way to determine, a priori, how many passes might be necessary
>> in any such file?
>>     
>
>    Thinking about this, two should be sufficient. It is for my data file, at
> least. Now the only commas are within text strings.
>
>    Thank you all for enhancing my understanding of sed.
>
> Rich
>   
Worst case scenario ...
    1,2,3,4,5,6,7,8,9,0
... after pass one ...
    1|2,3|4,5|6,7|8,9|0
... after pass two ...
    1|2|3|4|5|6|7|8|9|0
... so you are correct ... "two should be sufficient" ... a third pass 
would be unnecessary, but harmless (other than overhead).

In case of concern (wanting to check, for example), vi the file and do a 
search for the pattern ...
    /[0-9],[0-9]

Hope that helps
Regards
Fred James

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to