The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: yank
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-28-2003
criglerj's Avatar
criglerj criglerj is offline
Registered User
 

Join Date: May 2002
Location: Atlanta
Posts: 129
The simplest way for this is to create your one line, then run it through an external filter. With the cursor on the same line, type

!!awk ' {for(i=0;i<100;i++) print'

If you find yourself doing this a lot, type the line into your buffer this way:

!!awk ' {for(i=0;i<100;i++) print'^V^M

i.e., append a carriage return to the line. Now go to the beginning of the line and type

"dD

Now "@d" will replace whatever line you're on with 100 copies of it.