<?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: Copy a line 10 times with vi in HP-UX in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979611#M121900</link>
    <description>Hi James,&lt;BR /&gt;Repeating . 10 times will do. But suppose I want to generalize to 1000 times it's difficult. So I want a direct method.&lt;BR /&gt;&lt;BR /&gt;Your awk method really solved my problem. But out of curiosity I would like to know whether this is possible with vi.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot&lt;BR /&gt;&lt;BR /&gt;Regards!!!&lt;BR /&gt;Dipu&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 22 May 2003 11:48:32 GMT</pubDate>
    <dc:creator>Dipu</dc:creator>
    <dc:date>2003-05-22T11:48:32Z</dc:date>
    <item>
      <title>Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979603#M121892</link>
      <description>Hi,&lt;BR /&gt;  I tried to yank a line using "yy" and tried to paste the same 10 times by using "10P". But the line got pasted only once. &lt;BR /&gt;&lt;BR /&gt;In a similar way I tried to copy the line using "y$" and tried to paste it 10 times using "10P". This worked fine. &lt;BR /&gt;&lt;BR /&gt;But in the second case, the line copied was pasted in the same line.&lt;BR /&gt;But I want this to happen in multiple lines.&lt;BR /&gt;&lt;BR /&gt;Can any one suggest any other method other than using vi for duplicating a file containing one line 10 times.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 May 2003 10:38:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979603#M121892</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2003-05-22T10:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979604#M121893</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;yy&lt;BR /&gt;10pp&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Thu, 22 May 2003 10:45:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979604#M121893</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2003-05-22T10:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979605#M121894</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# awk '{for (i=0;i&amp;lt;10;i++) print $0}' infile &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 22 May 2003 10:45:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979605#M121894</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-05-22T10:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979606#M121895</link>
      <description>Hi,&lt;BR /&gt;It is very easy if you run CDE.&lt;BR /&gt;&lt;BR /&gt;Open the file with dtpad ,mark the line with left mouse button and copy with middle mouse button.&lt;BR /&gt;&lt;BR /&gt;It is also possible to use this method with vi.</description>
      <pubDate>Thu, 22 May 2003 10:45:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979606#M121895</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-05-22T10:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979607#M121896</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;line=$(cat file_with_line)&lt;BR /&gt;for i in 0 1 2 3 4 5 6 7 8 9 &lt;BR /&gt;do&lt;BR /&gt;echo $line &amp;gt;&amp;gt;new_file&lt;BR /&gt;done&lt;BR /&gt;HTH, Vicente.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 May 2003 10:47:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979607#M121896</guid>
      <dc:creator>Vicente Sanchez_3</dc:creator>
      <dc:date>2003-05-22T10:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979608#M121897</link>
      <description>Multi ways of doing this,...&lt;BR /&gt;&lt;BR /&gt;[Position on Line]&lt;BR /&gt;Y P&lt;BR /&gt;2Y P&lt;BR /&gt;4Y P&lt;BR /&gt;2Y P&lt;BR /&gt;&lt;BR /&gt;Makes 10 lines. I tend to use the simple approach for things like this,..&lt;BR /&gt;&lt;BR /&gt;Y P P P P P P P P P&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
      <pubDate>Thu, 22 May 2003 10:48:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979608#M121897</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2003-05-22T10:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979609#M121898</link>
      <description>Hi,&lt;BR /&gt;Paula, your solution did not work. It just prints the line 2 times as you mentioned pp.&lt;BR /&gt;&lt;BR /&gt;James, Thanks a lot for that alternate suggesion. But can you also suggest me a solution by using vi. As none of the solution I recieved seems to work fine.&lt;BR /&gt;&lt;BR /&gt;Leif, I don't wish to do a manual work for copying.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;Dipu</description>
      <pubDate>Thu, 22 May 2003 10:55:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979609#M121898</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2003-05-22T10:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979610#M121899</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Well, you asked for "..any other method other than using vi..." so I offered 'awk'.&lt;BR /&gt;&lt;BR /&gt;In 'vi' do:&lt;BR /&gt;&lt;BR /&gt;yy&lt;BR /&gt;p&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;...where the "." is a repetition of the 'p'ut, so you type "." eight times to yield a total of ten identical lines in the file.  Simple and fast!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 22 May 2003 11:21:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979610#M121899</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-05-22T11:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979611#M121900</link>
      <description>Hi James,&lt;BR /&gt;Repeating . 10 times will do. But suppose I want to generalize to 1000 times it's difficult. So I want a direct method.&lt;BR /&gt;&lt;BR /&gt;Your awk method really solved my problem. But out of curiosity I would like to know whether this is possible with vi.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot&lt;BR /&gt;&lt;BR /&gt;Regards!!!&lt;BR /&gt;Dipu&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 May 2003 11:48:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979611#M121900</guid>
      <dc:creator>Dipu</dc:creator>
      <dc:date>2003-05-22T11:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979612#M121901</link>
      <description>Yes - just do:&lt;BR /&gt;&lt;BR /&gt;10yy&lt;BR /&gt;p&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Thu, 22 May 2003 11:53:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979612#M121901</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-05-22T11:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979613#M121902</link>
      <description>in vi,&lt;BR /&gt;&lt;BR /&gt;10yy&lt;BR /&gt;&lt;BR /&gt;then move where you want to paste the lines.&lt;BR /&gt;&lt;BR /&gt;p&lt;BR /&gt;&lt;BR /&gt;done</description>
      <pubDate>Thu, 22 May 2003 12:04:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979613#M121902</guid>
      <dc:creator>Donny Jekels</dc:creator>
      <dc:date>2003-05-22T12:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979614#M121903</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Quite hard ... I can only do it using this command on the line to  be duplicated :&lt;BR /&gt;&lt;BR /&gt;!!awk '{while (i &amp;lt; 10) {print ; i++}}'&lt;BR /&gt;&lt;BR /&gt;Only the first ! will be displayed and you will have 10 times the original line in you current file.&lt;BR /&gt;&lt;BR /&gt;It can be put in a map (while Ypppppppppp can't)&lt;BR /&gt;&lt;BR /&gt;:map v !!awk '{while (i &amp;lt; 10) {print ; i++}}'^M&lt;BR /&gt;&lt;BR /&gt;hiting v in vi will duplicate 10 times current line.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Thu, 22 May 2003 12:16:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979614#M121903</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-05-22T12:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979615#M121904</link>
      <description>Dipu,&lt;BR /&gt;  Paula's suggestion will work with vim.&lt;BR /&gt;  I do most of the repeating stuff like what JRF has suggested second time.&lt;BR /&gt;  I prefer to use vim than vi.&lt;BR /&gt;  If you really want to automate the repetition n no. of times then awk is the best solution.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Umapathy&lt;BR /&gt;</description>
      <pubDate>Thu, 22 May 2003 13:30:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979615#M121904</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-05-22T13:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979616#M121905</link>
      <description>&lt;FROM man="" vi=""&gt;&lt;BR /&gt;&lt;BR /&gt;Most commands accept a preceding number as an argument, either to give a size or position (for display or movement commands), or as a repeat count (for commands that change text).  &lt;BR /&gt;&lt;/FROM&gt;&lt;BR /&gt;&lt;BR /&gt;Looks like P and p are not in the list of "most commands". Too bad.&lt;BR /&gt;&lt;BR /&gt;Not only that...&lt;BR /&gt;&lt;ALSO from="" man="" vi=""&gt;&lt;BR /&gt;.           Repeat the last command that changed the buffer.  If a count is specified, the command is repeated the  specified number of times.&lt;BR /&gt;&lt;/ALSO&gt;&lt;BR /&gt;&lt;BR /&gt;But the following doesn't do that&lt;BR /&gt;Y&lt;BR /&gt;P&lt;BR /&gt;9.&lt;BR /&gt;&lt;BR /&gt;The "9." just does it once!&lt;BR /&gt;Looks like we all learned something today.&lt;BR /&gt;&lt;BR /&gt;-- Graham&lt;BR /&gt;</description>
      <pubDate>Fri, 23 May 2003 07:05:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979616#M121905</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-05-23T07:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979617#M121906</link>
      <description>copy the line what you want to have 1000 times with &lt;BR /&gt;yy &lt;BR /&gt;&lt;BR /&gt;Got to the line where you want to place it and hit&lt;BR /&gt;p&lt;BR /&gt;&lt;BR /&gt;And now (if you need 1000 times this line) 1000. &lt;BR /&gt;&lt;BR /&gt;That's it&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Roland&lt;BR /&gt;&lt;BR /&gt;Feel free to assign points</description>
      <pubDate>Fri, 23 May 2003 09:01:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979617#M121906</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-05-23T09:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a line 10 times with vi in HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979618#M121907</link>
      <description>Go to the starting line.&lt;BR /&gt;&lt;BR /&gt;Shift Double Quote&lt;BR /&gt;x&lt;BR /&gt;1000 yy&lt;BR /&gt;&lt;BR /&gt;This will put 1000 lines into register x&lt;BR /&gt;&lt;BR /&gt;Now go to where you want to copy&lt;BR /&gt;&lt;BR /&gt;Shift Double Quote xp&lt;BR /&gt;&lt;BR /&gt;For Shift Double&lt;BR /&gt;(Hold down the Shift Key, Hit the '"  key)</description>
      <pubDate>Fri, 23 May 2003 13:48:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-a-line-10-times-with-vi-in-hp-ux/m-p/2979618#M121907</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2003-05-23T13:48:01Z</dc:date>
    </item>
  </channel>
</rss>

