가령 아래와 같이 파일의 1번째~100번째 줄을 추출하는 경우, 작은따옴표가 있는 경우와 없는 경우 차이가 있을 수 있나요?
sed -n '1,100p' input > output
감사합니다.
엄밀히 말하면 single quotation mark(')는 sed와는 무관합니다. shell에서 sed argument를 제대로 넘기기 위해 single quotation을 주로 이용합니다.
i.e) 아래 비교해 보세요. sed -n '1, 100p' input sed -n 1, 100p input
텍스트 포맷에 대한 자세한 정보
<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]
빼도 됩니다.
엄밀히 말하면 single quotation mark(')는 sed와는 무관합니다. shell에서 sed argument를 제대로 넘기기 위해 single quotation을 주로 이용합니다.
i.e) 아래 비교해 보세요.
sed -n '1, 100p' input
sed -n 1, 100p input
댓글 달기