Skip to content
Advertisement

Export value of corresponding site out to a new text file

I have a text file that contains two columns of data, the first column being a site ID and the second being a value. If the value is equal to 0, I want to send the corresponding site ID out to a new file. If the value is equal to 15, I want to do nothing.

Text File:

JavaScript

Attempted Script:

JavaScript

Advertisement

Answer

You can use this simple awk script:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement