'2010/03'에 해당되는 글 5건

  1. 2010/03/31 unix 파일내 문자열 치환 (perl 이용)
  2. 2010/03/30 WOW - Auctioneer 애드온 사용법
  3. 2010/03/26 아이유 스페셜~ (4)
  4. 2010/03/23 Beyonce - Ego (2)
  5. 2010/03/07 Tic Tok / Kesha (6)
posted by 박영창 2010/03/31 10:22
 unix 환경에서 perl 을 이용해서 파일내의 문자열 형태의 날짜 형태를 변경할때에는 아래와 같이 사용하면 됩니다.

201003310900%PU.LMIV003C%상품.업무%신계약%심사%장기인심사_처리(단체형)%0%1%49.13%0.006%48.426%%0.697%0.076%0%0.616%
201003310900%TD.AMDP0171%판매.마케팅%영업지원%정보큰바다%우편데이터고객업데이트%0%1%31.904%%0.203%%31.7%31.7%0%0%
201003310900%PU.LMIV003R%상품.업무%신계약%심사%장기인심사_조회(단체형)%0%3%31.876%0.002%30.214%%1.659%0.04%0%1.606%
...

 위와 같은 형태의 아스키 파일에서 앞부분의 timestamp 부분을 db2 가 제공하는 기본 timestamp 포맷인 
YYYY-MM-DD-HH.MM.SS.UUUUUU 형태로 변경해야지 데이터를 통으로 넣기가 수월합니다.

2010-03-31-09.00.00.000000%PU.LMIV003C%상품.업무%신계약%심사%장기인심사_처리(단체형)%0%1%49.13%0.006%48.426%%0.697%0.076%0%0.616%
2010-03-31-09.00.00.000000%TD.AMDP0171%판매.마케팅%영업지원%정보큰바다%우편데이터고객업데이트%0%1%31.904%%0.203%%31.7%31.7%0%0%
2010-03-31-09.00.00.000000%PU.LMIV003R%상품.업무%신계약%심사%장기인심사_조회(단체형)%0%3%31.876%0.002%30.214%%1.659%0.04%0%1.606%
...

이런 형태랄까요?

 보통은 이런 작업에는 sed 를 많이 사용하는 것 같습니다. (cut 을 이용해서도 구현이 가능하지만 cut 을 사용할 경우 파이프를 타고 데이터가 전달되면서 한글 부분에서 간간히 에러를 뱉는 현상이 발생하는 것 같습니다.)

 여튼 제가 찾아본 제일 간단한 방법은 perl 을 사용하는 것입니다.

perl -pi.bak -e 's/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([*]*)/$1-$2-$3-$4.$5.00/g' <filename>

 이런식이죠~
 
 만들어진 결과 파일은 

import from <filename> of del
                modified by codepage=970 usedefaults coldel%
                insert into <tabname>

 로 간단하게 입력이 가능합니다. (import 옵션에서도 timestampformat 을 지정할 수 있는데 왠지 잘 안되더군요.;;)
저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License
posted by 박영창 2010/03/30 20:01
wow.gamemeca.com 에서 펌.
워낙에 유명한 애드온이지만 사실상 사용법에 대해서 나온곳은 별로 없다는;;

실제로 보기에도 상당히 괜찮은 애드온입니당.


저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License
posted by 박영창 2010/03/26 20:55
오우 요즘 완전 빠져지네는 가수. -ㅅ-;;
- TV를 안보기 때문에 얼마전에야 이런 가수가 나왔다는 사실을 알았음 ;;; -

목소리가 너무 너무 좋다는 ..;;

마쉬멜로우를 들었을 땐 이건 뭐야 싶었는데 ㅎㅎ ^^;;
그 목소리로 부르는 다른 노래들은 정말 상쾌한 기분을 선사해줍니다. ^^

Loving You (Live) - IU


있잖아 - IU


Almost (Live) - IU


사랑은 봄비처럼 이별은 겨울비처럼 - IU & 이영현

원래도 좋은곡이지만... ㅎㄷㄷ 하다는.. ㅠ.ㅠ

사랑경보 (Live) - H유진 & IU


못된여자 2 - 원투 & IU
저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License
posted by 박영창 2010/03/23 01:57



Oh baby how you doing
You know I'm gonna
cut right to the chase
Some women were made
but me myself
I like to think that I was
created for a special purpose
You know
what's more special than you
You feel me
It's on baby let's get lost
You don't need to call into work
'cause you're the boss
For real want you to
show me how you feel
I consider myself lucky
that's a big deal
Why Well you got the
key to my heart
But you ain't gonna need it
I'd rather you open up my body
And show me secrets
you didn't know was inside
No need for me to lie
It's too big
it's too wide
It's too strong
it won't fit
It's too much
it's too tough
He talk like this
'cause he can back it up
He got a big ego
such a huge ego
I love his big ego
it's too much
He walk like this
'cause he can back it up
Usually I'm humble
right now I don't choose
You can leave with me or
you could have the blues
Some call it arrogant
I call it confident
You decide when you find
on what I'm working with
Damn I know I'm killing you
with them legs
Better yet them thighs
Matter a fact
it's my smile or maybe my eyes
Boy you a site to see
kind of something like me
It's too big
it's too wide
It's too strong
it won't fit
It's too much
it's too tough
I talk like this
'cause I can back it up
I got a big ego
such a huge ego
But he love my big ego
it's too much
I walk like this
'cause I can back it up
I I walk like this
'cause I can back it up
I I talk like this
'cause I can back it up
I I can back it up
I can back it up
I walk like this
'cause I can back it up
It's too big
it's too wide
It's too strong
it won't fit
It's too much
it's too tough
He talk like this
'cause he can back it up
He got a big ego
such a huge ego
such a huge ego
I love his big ego
it's too much
He walk like this
'cause he can back it up
Ego so big you must admit
I got every reason to feel like
I'm that bitch
Ego so strong
if you ain't know
I don't need no beat
I can sing it with piano



왠지 멋지다는.. -ㅅ-;;

저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License
posted by 박영창 2010/03/07 00:28
Wake up in the morning
feeling like P Diddy
Hey what up girl
Put my glasses on Im out the door
I'm gonna hit this city Let's go
Before I leave
brush my teeth with a bottle of Jack
Cause when I leave for the night
I ain't coming back
I'm talking pedicure on our
toes toes
Trying on all our
clothes clothes
Boys blowing up our
phones phones
Drop toping
playing our favorite cds
Pulling up to the parties
Trying to get a little bit tipsy
Don't stop make it pop
DJ blow my speakers up
Tonight Imma fight
Til we see the sunlight
Tick tock on the clock
But the party don't stop
Woah oh oh oh
Woah oh oh oh
Don't stop make it pop
DJ blow my speakers up
Tonight Imma fight
Til we see the sunlight
Tick tock on the clock
But the party don't stop
Woah oh oh oh
Woah oh oh oh
Aint got a care in world
but got plenty of beer
Aint got no money in my pocket
but I'm already here
and now the dudes are lining up
cause they hear we got swagger
But we kick em to the curb unless
they look like Mick Jagger
Im talking about
everybody getting crunk crunk
Boys trying to touch my junk junk
Gonna smack him if he getting too
drunk drunk
Now now we goin til they kick us
out out
Or the police shut us down down
Police shut us down down
Po po shut us
Don't stop make it pop
DJ blow my speakers up
Tonight Imma fight
Til we see the sunlight
Tick tock on the clock
But the party don't stop
Woah oh oh oh
Woah oh oh oh
Don't stop make it pop
DJ blow my speakers up
Tonight Imma fight
Til we see the sunlight
Tick tock on the clock
But the party don't stop
Woah oh oh oh
Woah oh oh oh
DJ you build me up
You break me down
My heart it pounds
Yeah you got me
With my hands up
You got me now
You gotta that sound
Yea you got me
DJ you build me up
You break me down
My heart it pounds
Yeah you got me
With my hands up
put your hands up
Put your hands up
No the party don't stop
until I walk in
Don't stop make it pop
DJ blow my speakers up
Tonight Imma fight
Til we see the sunlight
Tick tock on the clock
But the party don't stop
Woah oh oh oh
Woah oh oh oh
Don't stop make it pop
DJ blow my speakers up
Tonight Imma fight
Til we see the sunlight
Tick tock on the clock
But the party don't stop
Woah oh oh oh
Woah oh oh oh

저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License
TAG