어떤 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!
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
Re: 파일에서 레코드 뽑아 오기 질문
curl -s -I 'http://somehost.com/'| head -n 1
-----
http://monpetit.posterous.com/
http://monpetit.tistory.com/
^^ oh
hooray! thanks this tip!
댓글 달기