first.csv second.csv required output.csv How to achieve above scenario like replace or adding rows from one CSV to another CSV file based on a condition in linux. Thanks in advance . I tried below command but its not working . Replacing same record for all rows which satisfies the condition. Answer Another awk