Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    4

    Unanswered: Change Unwanted Data

    Hi,

    I'm looking for a shell script to change certain data points from my text file to something useable. All of the points that I would like to remove have the value -998.00. I need to find a command that will change the values of -998.00 to 0.00 without opening the file in a text processor. What could I type to change the values and make a new file named something.dat? Thank you!

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    sed 's/-998\.00/0.00/g' input_file > temp_file
    mv temp_file input_file
    or, for the same result

    perl -pi -e '/-998\.00/0.00/g' input_file
    Jean-Pierre.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •