<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to append something to appointed line of ACSII file use command line? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446905#M15478</link>
    <description>Nick,&lt;BR /&gt;&lt;BR /&gt;Maybe this script may help (chose your favorite name):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;lin=0&lt;BR /&gt;while read -e line&lt;BR /&gt;do&lt;BR /&gt;   let "lin += 1"&lt;BR /&gt;   if [ "$lin" == "$1" ]; then&lt;BR /&gt;     echo $line$2&lt;BR /&gt;   else&lt;BR /&gt;     echo $line&lt;BR /&gt;   fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Use&lt;BR /&gt;# cat abc.txt | script 2 " 138" &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;where 2 is line and " 138" is text to append.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
    <pubDate>Mon, 20 Dec 2004 05:25:00 GMT</pubDate>
    <dc:creator>Bojan Nemec</dc:creator>
    <dc:date>2004-12-20T05:25:00Z</dc:date>
    <item>
      <title>How to append something to appointed line of ACSII file use command line?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446901#M15474</link>
      <description>How to append something to appointed line of ACSII file use command line?&lt;BR /&gt;For example:&lt;BR /&gt;append " 138"  to abc.txt must follow "130 131 132 133 134 135 136 137"&lt;BR /&gt;original abc.txt&lt;BR /&gt;[root@webapp home]# cat abc.txt&lt;BR /&gt;&lt;LIMIT get="" post="" put=""&gt;&lt;BR /&gt;130 131 132 133 134 135 136 137&lt;BR /&gt;&lt;/LIMIT&gt;&lt;BR /&gt;&lt;BR /&gt;I need execute one or more command under command line to append content of abc.txt.&lt;BR /&gt;&lt;BR /&gt;I wanna  abc.txt  as following:&lt;BR /&gt;[root@webapp home]# cat abc.txt&lt;BR /&gt;&lt;LIMIT get="" post="" put=""&gt;&lt;BR /&gt;130 131 132 133 134 135 136 137 138&lt;BR /&gt;&lt;/LIMIT&gt;</description>
      <pubDate>Mon, 20 Dec 2004 02:44:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446901#M15474</guid>
      <dc:creator>NiCK_76</dc:creator>
      <dc:date>2004-12-20T02:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to append something to appointed line of ACSII file use command line?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446902#M15475</link>
      <description>sed s/"137"/"137 138"/ abc.txt&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sergejs</description>
      <pubDate>Mon, 20 Dec 2004 04:01:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446902#M15475</guid>
      <dc:creator>Sergejs Svitnevs</dc:creator>
      <dc:date>2004-12-20T04:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to append something to appointed line of ACSII file use command line?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446903#M15476</link>
      <description>Ooops, if you want script, simply like this:&lt;BR /&gt;&lt;BR /&gt;sed s/"137"/"137 138"/ abc.txt &amp;gt; abc_changed.txt&lt;BR /&gt;&lt;BR /&gt;mv -f abc_changed.txt abc.txt&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sergejs</description>
      <pubDate>Mon, 20 Dec 2004 04:07:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446903#M15476</guid>
      <dc:creator>Sergejs Svitnevs</dc:creator>
      <dc:date>2004-12-20T04:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to append something to appointed line of ACSII file use command line?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446904#M15477</link>
      <description>The abc.txt just a test file. And maybe content differently.&lt;BR /&gt;I just knew line number , not content.</description>
      <pubDate>Mon, 20 Dec 2004 04:26:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446904#M15477</guid>
      <dc:creator>NiCK_76</dc:creator>
      <dc:date>2004-12-20T04:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to append something to appointed line of ACSII file use command line?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446905#M15478</link>
      <description>Nick,&lt;BR /&gt;&lt;BR /&gt;Maybe this script may help (chose your favorite name):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;lin=0&lt;BR /&gt;while read -e line&lt;BR /&gt;do&lt;BR /&gt;   let "lin += 1"&lt;BR /&gt;   if [ "$lin" == "$1" ]; then&lt;BR /&gt;     echo $line$2&lt;BR /&gt;   else&lt;BR /&gt;     echo $line&lt;BR /&gt;   fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Use&lt;BR /&gt;# cat abc.txt | script 2 " 138" &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;where 2 is line and " 138" is text to append.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Mon, 20 Dec 2004 05:25:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446905#M15478</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2004-12-20T05:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to append something to appointed line of ACSII file use command line?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446906#M15479</link>
      <description>Example:&lt;BR /&gt; line number=2&lt;BR /&gt; text to add=138&lt;BR /&gt;&lt;BR /&gt;Script:&lt;BR /&gt;&lt;BR /&gt;sed '2,2 s/$/ 138/' abc.txt &amp;gt; abc_changed.txt&lt;BR /&gt;mv -f abc_changed.txt abc.txt</description>
      <pubDate>Mon, 20 Dec 2004 05:36:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-append-something-to-appointed-line-of-acsii-file-use/m-p/3446906#M15479</guid>
      <dc:creator>Sergejs Svitnevs</dc:creator>
      <dc:date>2004-12-20T05:36:46Z</dc:date>
    </item>
  </channel>
</rss>

