Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. alexknt

    make 2 or multiple blank lines a RS

    Hi feherke, your last solution works perfectly in AIX and Ubuntu. Many thanks for your help, Alexknt
  2. alexknt

    make 2 or multiple blank lines a RS

    feherke, the command awk -vRS='\n\n\n+' '{print>sprintf("%03d.lct",NR)}' /input/file works perfectly on my ubuntu server. pb seems to come from my awk command on my AIX box. but I don't know how to bypass this pb Alexknt
  3. alexknt

    make 2 or multiple blank lines a RS

    Thanks for your help feherke I have already tried your 1st solution without success. awk -vRS='\n\n\n+' '{print>sprintf("%03d.lct",NR)}' /input/file but it gives me 13 files ( 1 by line from input file ) instead of 3 files. I don't know why it does not work. FYI: #od -c file 0000000 1 \n...
  4. alexknt

    make 2 or multiple blank lines a RS

    Hi, here is my input file: #cat file 1 2 3 4 5 6 7 I want to split this file into files with the record separator RS = 2 or more blank lines. Therefore I should obtain: #cat 001.lct 1 2 3 #cat 002.lct 4 5 #cat 00.lct 6 7 My command : awk ' BEGIN { RS="" } { i++...

Part and Inventory Search

Back
Top