I'm using sed to do find and replace. But since the file is huge and i have more than 1000 files to be searched, the script is taking a lot of time. Can somebody help me with a better sed command. Below is the details.
Input:
1
1
2
3
3
4
5
5
Here I know the file is sorted.
My cross reference file will be
1A
2B
3C
4D
5E
6F
here also the file will be sorted on the first character.
Just a hint:
If you experience performance problems then you should probably forget about shell at this point and use some programming language. I/O can be far superior to what you can get with shell scripts.
I need further help on the issue posted by gpaulose. I need awk command to append a string at the end of the lines in a text file where a certain string match is found. I am using grep to find a match in the file and then appending.
I am using sed command at present. But the file size is huge and there are 100s of such files. So sed is taking too much time.
Can someone tell me the awk command to append a string at the end of line where a certain string match s found. Performance is very important here.