Astrolitterbox

Friday, November 9, 2012

awk: removing lines with duplicate beginnings from a file

awk -F, '!_[$1]++' inputFile > outputFile
Posted by astrolitterbox at 12:28 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: awk, flat files horror, unix

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2014 (3)
    • ►  March (1)
    • ►  January (2)
  • ►  2013 (117)
    • ►  December (6)
    • ►  November (23)
    • ►  October (3)
    • ►  September (3)
    • ►  August (2)
    • ►  June (12)
    • ►  May (14)
    • ►  April (12)
    • ►  March (3)
    • ►  February (14)
    • ►  January (25)
  • ▼  2012 (96)
    • ►  December (8)
    • ▼  November (12)
      • lit review: Tully-Fisher relation vs. morphology
      • Scipy: installing from source
      • some Python scripts from Durham
      • awk: making a LaTeX table from a csv file
      • Converting IDL color table to Python: Matplotlib c...
      • Seeing structure in the data: histogram bin widths
      • location of Python module file
      • awk: removing lines with duplicate beginnings from...
      • ds9 to NumPy pixel coordinates
      • Matplotlib: XKCDify, bimodal Gaussians
      • Matplotlib: intensity map with hexbin
      • SQLite: one more query
    • ►  October (19)
    • ►  September (5)
    • ►  August (25)
    • ►  May (8)
    • ►  April (13)
    • ►  March (5)
    • ►  February (1)

About Me

astrolitterbox
I am an astrophysics PhD student. My memory is short, hence this blog.
View my complete profile
Awesome Inc. theme. Powered by Blogger.