This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Generate xml input files

By: hakonhagland on Jan 16th, 2014  |  syntax: None  |  size: 0.24 KB  |  views: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /bin/bash
  2.  
  3. N=$1
  4.  
  5. awk -vN="$N" 'BEGIN{ for (i=1; i<=N; i++) {
  6.   print "<text id=\""i"\">"
  7.   print "bla bla bla bla........."
  8.   print "</text>"
  9.  }}' > file1
  10.  
  11. awk -vN="$N" 'BEGIN{ for (i=1; i<=N; i++) {
  12.   print i, "title" i
  13.   }}' > file2
clone this paste RAW Paste Data