Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: cdj02
  • Order by date
  1. cdj02

    Joining and sorting multiple text files

    prex1 - your code works perfectly and sorts exactly the way I wanted. The only odd thing it does is that it adds a blank line at the top of the file for each .cst file input. I ran my test with 10 files and it put 10 blank lines at the top.
  2. cdj02

    Joining and sorting multiple text files

    Prex1 - The example sizes are the typical file sizes I'm working with and as for sorting by site, the site represents XY coordinates of the measurements. I was thinking I'd remove the comma to make it easier to sort. Ultimately, I only need to match up the measurements from file to file so I can...
  3. cdj02

    Joining and sorting multiple text files

    I don't know where that ] came from at the end of the code snippet in my post above but it doesn't belong there....sorry if it caused any confusion.
  4. cdj02

    Joining and sorting multiple text files

    Feherke, I'm testing out this line perl -nlae '$h=$_ if$.==1;($d=$F[19])=~s,(../..)/(....),$2/$1,;push@d,[@F,$d]if@F&&$_ ne$h;END{print join"\t",splice@{$_},0,-1for sort{$a->[-1]cmp$b->[-1]||$a->[15]cmp$b->[15]||$a->[0]<=>$b->[0]}@d}' *.cst,* > ALL_CST.cst ] but I'm getting Bareword found...
  5. cdj02

    Joining and sorting multiple text files

    Thanks for the speedy response! The data is generated on a unix system but I pull the files remotely to my Windows based laptop and process it with strawberry perl. I'd be ok with processing the files line by line if that is a better way to do it. As i said, i'm new to perl so slurping a whole...
  6. cdj02

    Joining and sorting multiple text files

    Hello, I run systems that collect measurement data and dump it into delimited text files. I'm trying to join these files and sort them by Date, Target_Name, and site so that i can plot the data. Currently, i have the following code that does work to join the files into a single file called...

Part and Inventory Search

Back
Top