파일에 다음과 같은 문자열 이 있다면 <body test="aaa">
<body test="aaa"> here is inserted
이와 같이 위의 body 부분은 변경되지 않고 밑에만 한줄이 추가되어야 하는데 어떻게 해야 할지 잘 모르겠습니다.
물론 <body 란 건 다음에는 여러가지 값들이 들어올수있습니다.
cat test.txt | sed 's/^\(<body.*\)/\1\nHere is New Test/g';
잘 읽어보시면 답이 나와용
http://wiki.kldp.org/wiki.php/DocbookSgml/Sed-TRANS
감사합니다..많은 도움이 됐습니다^^
10년후의 나와 인사하자!!
텍스트 포맷에 대한 자세한 정보
<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]
[code:1]cat test.txt | sed 's/^\(&
잘 읽어보시면 답이 나와용
http://wiki.kldp.org/wiki.php/DocbookSgml/Sed-TRANS
감사합니다..많은 도움이 됐습니다^^
감사합니다..많은 도움이 됐습니다^^
10년후의 나와 인사하자!!
댓글 달기