Search Results

Search: Posts Made By: Dip_1985
6,121
Posted By Dip_1985
Once again - code tags!
Hi,

the code is working for $$values that has a . after it or end of line. In case I have the record as below it is not replacing it.
...
6,121
Posted By Dip_1985
Thanks @MadeInGermany . It did the trick and gave...
Thanks @MadeInGermany . It did the trick and gave the expected output.
6,121
Posted By Dip_1985
both the codes are replacing all the matching...
both the codes are replacing all the matching pattern. If I have $$Date and $$Date_1 it is replacing like 20200305 and 20200305_1 but I have different values for $$Date_1. How to skip that. if I try...
6,121
Posted By Dip_1985
Thanks for the suggestion. that worked. But now...
Thanks for the suggestion. that worked. But now the last part of replacing it in a different file is not working. I tried the below two codes.

#!/bin/bash
while read line
do
key= echo "$line" |...
6,121
Posted By Dip_1985
The below code is throwing error too ...
The below code is throwing error too

#!/bin/bash
while read line
do
key= $(sed 's/\(.*\)\=.*/\1/' $line)
value=$(sed 's/.*\=//g' $line)
sed "s/$key/$value/g" test.txt
done < bbb.txt
...
6,121
Posted By Dip_1985
Thanks a lot @MadeInGermany. Now if I want to...
Thanks a lot @MadeInGermany. Now if I want to lookup these values in a separate file and substitute the params with actual values what will the code be. Like My other file is having values for all...
6,121
Posted By Dip_1985
I used this sed 's/.*\$//' test.txt >> aaa.txt ...
I used this sed 's/.*\$//' test.txt >> aaa.txt

This command works to fetch the data correctly from the $$ till the end of line. But its not sufficing the condition to fetch data from $$ to .

...
6,121
Posted By Dip_1985
How to extract string between two specified characters and end of line?
Hi All,

I am trying to extract a string between two characters in a file and then look up that string in a separate file. E.g. first file is ABC.txt and its contents are
abc.$$Date...
Showing results 1 to 8 of 8

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