Makefile 처럼 파일시간비교해서 컴파일을 해야할 상황이 생겼는데요 (gcc로 컴파일하는것은 아닙니다) 아래와 같이 코딩을 하고 싶은데... if문장을 도저히 넣지를 못하겠습니다.
#! /bin/sh if( 소스코드가 오브젝트보다 최신의 파일이면 ) then do compile fi
파일 시간비교는 어떻게 하는 것인가요?
man test 를 하면 다음과 같은 항목을 얻을수 있습니다.
$ man test ... file1-ot file2 True, if file1 exists and is older than file2. file1-ef file2 True, if file1 and file2 exist and refer to the same file. ...
#!/bin/sh if [ a.o -ot a.c ] then do.compile fi
--- 배려하는 마음을 갖자.
@.@ 고맙습니다.
@.@
man test 를 하면
man test
를 하면 다음과 같은 항목을 얻을수 있습니다.
$ man test ... file1-ot file2 True, if file1 exists and is older than file2. file1-ef file2 True, if file1 and file2 exist and refer to the same file. ...#!/bin/sh if [ a.o -ot a.c ] then do.compile fi---
배려하는 마음을 갖자.
---
배려하는 마음을 갖자.
아..감사합니다.
@.@
고맙습니다.
@.@