SHARE
TWEET

Generate xml input files

hakonhagland Jan 16th, 2014 47 Never
  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
RAW Paste Data
Top