[ale] help with sed and regex

DJ-Pfulio djpfulio at jdpfu.com
Tue Jul 26 12:11:25 EDT 2016


How's this?

$ rename 's/^(.{1,2})/$1_/g' *


On 07/26/2016 11:33 AM, Chuck Payne wrote:
> Leam,
> 
> Your example works, thanks.
> 
> What I had was
> 
> flSunshine
> flHeat
> flBeaches
> 
> So yes I was trying to get
> 
> fl_Sunshine
> fl_heat
> fl_Beaches
> 
> On Tue, Jul 26, 2016 at 11:03 AM, DJ-Pfulio <djpfulio at jdpfu.com> wrote:
>> I'd use 'rename' ... please post before and after examples.  Also, what
>> character set is this? Anything funny about the locale?  UTF8, UTF16, UTF32 or
>> something else? Perl regex handles these things, but you have to tell it correctly.
>>
>> On 07/26/2016 10:43 AM, Chuck Payne wrote:
>>> Guys,
>>>
>>> I am still weak on regex. So I have a question. I got a list of
>>> directories that I need to add _ too. It should be as the first two
>>> character are lower for the state and then the Client name is a Upper
>>> Case  character. What is the best way to do that?




More information about the Ale mailing list