Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 8  |  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. awk, a field doesn't match but it should match
  2. cat file |awk -v FS="t" '$2 ~ /[0-9]{1}/ {print $0;}'
  3.        
  4. cat file |awk -v FS="t" '$2 ~ /.{1}/ {print $0;}'  #because the second fields of my file have  all second fields as number
  5.        
  6. awk '$2 ~ /^[0-9]$/{print}' FS="t" file
  7.        
  8. awk --re-interval '$2 ~ /[0-9]{1}/{print}' FS="t" file
  9.        
  10. awk '1 <= $2 && $2 <= 9 {print}'