Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. TBS001 12
  2. TBS002 50
  3. TBS003 20
  4. TBS004 45
  5.  
  6. TBS001 10
  7. TBS002 50
  8. TBS003 20
  9. TBS004 40
  10.  
  11. kent$ awk 'NR==FNR{a[$1]=$2;next}$1 in a && $2<a[$1]{
  12. printf "increase Tablespace %s by %d MBn",$1,(a[$1]-$2)}' f f2
  13. increase Tablespace TBS001 by 2 MB
  14. increase Tablespace TBS004 by 5 MB
  15.  
  16. $ awk '
  17. NR==FNR{a[$1]=$2;next}
  18. $2<a[$1]{print "Increase Tablespace",$0,"by",a[$1]-$2,"MB"}' source target
  19. Increase Tablespace TBS001 10 by 2 MB
  20. Increase Tablespace TBS004 40 by 5 MB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement