Search Results

Search: Posts Made By: dondilip
24,656
Posted By dondilip
Thanks again..I hope this will be my last request...
Thanks again..I hope this will be my last request on this script..

If the second field has value either 2 or 3, the above script will replace it to 1. I want the script modified to search &...
24,656
Posted By dondilip
Super Kamaraj...but only the replace entries are...
Super Kamaraj...but only the replace entries are there in the new file..I want both replaced and non-replaced entries in the same file.

Thanks in advance.
24,656
Posted By dondilip
Hi Kamaraj, The script works fine..but as...
Hi Kamaraj,

The script works fine..but as you remember as we redirecting the output back to the source file itself, the other entries which are not replaced are gone. Can you help in modifying the...
24,656
Posted By dondilip
hi Kamaraj, Your script works perfectly. I...
hi Kamaraj,

Your script works perfectly. I want one more assistance.

when the awk script it matches second field value and replace the value and I export it to a separate file.

During the...
24,656
Posted By dondilip
In my case the the input_file will like *.csv...
In my case the the input_file will like *.csv then also will it work?
24,656
Posted By dondilip
Works perfectly....bye for now ----------...
Works perfectly....bye for now

---------- Post updated at 05:21 PM ---------- Previous update was at 03:48 PM ----------

Hi Kamaraj,

I actually run the awk on multiple files..and export the...
24,656
Posted By dondilip
Input file ...
Input file

919925623336,1,2011-07-11T23:33:31.000+05:30,
919099951769,2,2011-07-11T23:34:48.000+05:30,
918306699170,2,2011-07-11T23:32:20.000+05:30,

output File expected
...
24,656
Posted By dondilip
Even the awk works, but I want the output to be...
Even the awk works, but I want the output to be only the ones which are replaced not all the entries,,Is it possible?
24,656
Posted By dondilip
Sorry man I dont have nawk package..Can I use awk...
Sorry man I dont have nawk package..Can I use awk instead?
24,656
Posted By dondilip
Hi Kamaraj, In your sed, it replace all the...
Hi Kamaraj,

In your sed, it replace all the second column value to the replace value, but I want to replace only the one which matches column value not the others.


The sed output has both...
24,656
Posted By dondilip
try my suggestion in the #4 post $ sed...
try my suggestion in the #4 post


$ sed 's/,\([0-9]*\),/,1010,/' input.txt
9788691010,1010,20120120002804,
9705645060,1010,20120120004753,
9014961516,1010,20120120004809,



----------...
24,656
Posted By dondilip
,. means first comma followed by only one...
,. means first comma followed by only one character. If it has to four characters then ,.... right?


Here is another file where I want to change the second column to 1010
...
24,656
Posted By dondilip
Micheal how does the sed select the second field...
Micheal how does the sed select the second field in your above command.
24,656
Posted By dondilip
search and replace in csv file
I have csv file where I want the second column has to be replaced with value 1.

Source file
919568760477,1,2011-07-11T22:34:27.000+05:30,
919557735692,2,2011-07-11T22:36:16.000+05:30,...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy