Answer the question
In order to leave comments, you need to log in
How to replace a character in a string in BASH?
There is a document (text.csv) that contains lines in the format 1*2*3*4*5. I want to fulfill the condition, if the value in column 4 is different from 0, then replace it with 1.
I wanted to do something like: cat text.csv | awk '{if ($4!=0) and here's a replacement}'.
Help me figure it out please
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question