how to convert lower case to uppercase in a word in a line ?

Philip Hallstrom freebsd at philip.pjkh.com
Fri Sep 16 11:29:58 PDT 2005


> On 9/16/05, Jonathan Glaschke <no-html at jonathan-glaschke.de> wrote:
>> Hello,
>> On Fri, Sep 16, 2005 at 06:51:16PM +0300, Yavuz Maslak wrote:
>>> Hello
>>>
>>> There is a word that consists lowercases.
>>> How to change all of letters capital letters in stead of lowercase ?
>>> is there any script about that ?
>>> Thanks
>>> _______________________________________________
>> Or you do this using perl:
>>
>> $ perl -e 'chomp && system("mv $_ ".uc($_)) foreach `ls`;'
>>
>
> sed, awk, python, php, ruby, <whatever> versions are to follow
> shortly :)

Or, just install mmv from ports...

from the man page...

Mmv moves (or copies, appends, or links, as specified) each source file
matching a from pattern to the target name specified by the to pattern.
This  multiple  action is performed safely, i.e. without any unexpected
deletion of files due to collisions of target names with existing file-
names  or with other target names.  Furthermore, before doing anything,
mmv attempts to detect any errors that would result from the entire set
of actions specified and gives the user the choice of either proceeding
by avoiding the offending parts or aborting.



More information about the freebsd-questions mailing list