2008년 7월 28일 월요일

메타캐릭터

와일드카드 메타캐릭터
- 일치하는 파일 이름으로 전개되는 패턴에 사용할 수 있는 메타캐릭터
* - 0개 이상의 문자와 대응
? - 하나의 문자와 대응
[abc] - 대괄호 사이에 있는 문자 중 하나의 문자와 대응
[!az] - 나열된 문자를 제외한 하나의 문자와 대응
[a-z] - 목록의 범위 내에 있는 문자 중 하나와 대응

문자 대응 클래스
[[:upper:]] - 모든 대문자와 대응: A, B, C,...Z
[[:lower:]] - 모든 소문자와 대응: a, b, c, ...z
[[:digit:]] - 숫자와 대응: 0, 1, 2, ...9
[[:space:]] - 공백, 탭 등과 대응

2008년 7월 5일 토요일

언제 부터인가 업데이트 관리자가 에러...

구글링 결과

/etc/apt/source.list 에 문제가 있다.

해결법
아래의 내용으로 세롭게 source.list파일을 만든다.

sudo mv /etc/apt/source.list /etc/apt/source.list.bak

sudo vi /etc/atp/source.list 하고나서 아래의 내용을 붙여 넣고 저장

다시 업데이트 관리자 실행해보면 업데이트 잘한다....


# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cl.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb-src http://cl.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu hardy partner
# deb-src http://archive.canonical.com/ubuntu hardy partner

deb http://us.archive.ubuntu.com/ubuntu/ hardy-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-security main restricted
deb http://us.archive.ubuntu.com/ubuntu/ hardy-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-security universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-security multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-proposed restricted main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports restricted main multiverse universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-security multiverse

2008년 6월 4일 수요일

디렉토리 토글 cd -

pushd
popd
이런 명령으로 디렉토리를 왓다 갔다 한다고 한다.
난 몰랐다.
cd ../../../
이렇게 나왔닥 다시 cd xxx/yyy/zzz/
이렇게 들어갔다 나왔다..
근데...
cd -
이런 방금 전 디렉토리로..
다시 cd -
그럼 다시 원래 위치로..

이렇게 알면 편한게 있다니...

svn diff 로 소스 코드 수정 라인수 알아 보기

svn diff | grep ^+ | grep -v ^+++ | wc -l

svn을 이용해서 소스코드를 관리 하고 있다면 내가 작업한 소스 수정 변경 라인수를 알고 싶을떄.

2008년 6월 1일 일요일

makereview

개발 프로젝트 소스중에 현재 수정된것은 tkdiff로 추가로 만드러진 파일은 emacs로
하기 위한 스크립트

function makereview()
{
svn st -q >o
awk '{ if ($1 == "M") {print "tkdiff "$2;} else {print "emacs "$2} }' o > review
. review
}

먼전 svn st -q > o 에 의해 변경된 파일은 M 파일명 추가된 건 A 파일명 이렇게 두개의 열로
결과 파일이 o로 저장된다.
이걸 awk로 M을 tkdiff로 나머지를 emacs로 변경 한다음
그파일을 review로 저장 하고 실행하게 하는 스크립트다.

2008년 5월 23일 금요일

ia64-hpux 에서 gcc 컴파일시 64bit 옵션

컴파일 옵션 -mlp64
링크 옵션 -mlp64
이걸 하지 않으면 기본적으로 32bit컴파일이 진행 된다.
make에서 CCFLAG, CFLAG , LDFLAG 같은것에 추가해야 한다.
컴파일에만 옵션을 주면 링크에서 에러가 발생 한다.

32bit 오브젝트 인지 64bit Object인지 확인

#file -h *.o
file 명령으로 확인이 가능하다.
64비트 컴파일 하고 링크 과정에서 링크 할수 없다는 메세지 때문에. 고생했다.