help me debug my "word capitalizer" script
Chris Angelico
rosuav at gmail.com
Wed Aug 22 06:41:42 EDT 2012
On Wed, Aug 22, 2012 at 8:28 PM, Kamil Kuduk <kamil.kuduk at gmail.com> wrote:
>> Purpose of the script:
>> To capitalize the first letter of any word in a given file, leaving
>> words which have 3 or less letters.
>
> First or all? If first and this is the only purpose of the script you
> can easily use sed:
> less file.txt | sed -e "s/\b\([a-z]\{4,\}\)/\u\1/g"
Why less? Why not just redirect input?
Though, this isn't really on topic for Python.
ChrisA
More information about the Python-list
mailing list