Advertisement
cd62131

Split Data

Jul 15th, 2014
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. #!/bin/bash -e
  2. typeset -g DATA=$1
  3. typeset -g RESULT=${2:-'result'}
  4. typeset -i i
  5. typeset -i j
  6. : > ${RESULT}
  7. for ((i = 1, j = 100; i < 1000; i += 100, j += 100)); do
  8.   cut -d , -f ${i}-${j} ${DATA} >> ${RESULT}
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement