Advertisement
niccarp

Untitled

Sep 9th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #/bin/bash
  2.  
  3.  filedata="data"
  4.  fileblack="black"
  5.  fileclean="clean"
  6.  dos2unix $filedata $fileblack
  7.  
  8.  cat $filedata | sort > $filedata.sort
  9.  cat $fileblack | sort > $fileblack.sort
  10.  
  11.  comm -23 $filedata.sort $fileblack.sort > $fileclean
  12.  
  13.  unix2dos $fileclean
  14.  
  15.  echo 'rcpts new: ' $(cat $filedata | nl | tail -1 | awk '{print $1}')
  16.  echo 'rcpts black: '$(cat $fileblack | nl | tail -1 | awk '{print $1}')
  17.  echo 'rcpts cleanfiltered: '$(cat $fileclean | nl | tail -1 | awk '{print $1}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement