
script to change lower case to upper case
hamilton> Well, how about the following sed script:
hamilton> 6,${s/^a/A/
hamilton> s/^b/B/
hamilton> s/^c/C/
hamilton> :
hamilton> s/^z/Z/
hamilton> s/,a/,A/
hamilton> s/,b/,B/
hamilton> s/,c/,C/
hamilton> :
hamilton> s/,z/,Z/
hamilton> }
hamilton> There may be scripts that are shorter or will run faster
hamilton> but I doubt you'll find something simpler.
Well, I think *this* is pretty simple:
perl -pe 's/\w+/\u$&/g if 6..eof' somefile
And it's also likely to be faster, and it is *clearly* shorter.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
# legal fund: $16989.84 collected, $162159.85 spent; email f...@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <mer...@stonehenge.com> Snail: (Call) PGP-Key: (finger mer...@ora.com)
Web: <A HREF="http://www.teleport.com/~merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me