어떤 web서버에 접근한다음 status코드 첫번째 한라인만 뽑아 올라고 아래같이 했는데.. 잘 안되네요..어떻게 해야 되나요?
curl -s -I 'http://somehost.com/'|awk 'BEGIN{FS="\n";}{print $1;}'
curl -s -I 'http://somehost.com/'| head -n 1
-----http://monpetit.posterous.com/http://monpetit.tistory.com/
hooray! thanks this tip!
Re: 파일에서 레코드 뽑아 오기 질문
curl -s -I 'http://somehost.com/'| head -n 1-----
http://monpetit.posterous.com/
http://monpetit.tistory.com/
^^ oh
hooray! thanks this tip!