Search Results

Search: Posts Made By: PriyankaM
1,482
Posted By PriyankaM
Thanks franklin and alister for the quick reply ...
Thanks franklin and alister for the quick reply
worked with nawk
nawk -F"|" 'substr($2,4,6)==a {sub(a,b,$2); print}' a="909090" b="451234" OFS="|" file1 > file2
1,482
Posted By PriyankaM
Hi Franklin, Getting the following error: ...
Hi Franklin,

Getting the following error:
% awk -F"|" 'substr($2,4,6)==a{sub(a,b,$2)}1' a="909090" b="451234" OFS="|" file1 > file2
awk: syntax error near line 1
awk: illegal statement near...
1,482
Posted By PriyankaM
Create a file after replacing a particular pattern in another file
I have a file as below:
file1
-----
1|CT1909090TRYGH
2|CTH909090GHDGJ
4|CT9909090HSGUS
10|AT0735732YQGDJ
21|CTP909090BAFSL
100|BAI891253NSHDD

Now, I have to replace "909090" to "451234"....
Showing results 1 to 3 of 3

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