I am trying to use SED to change values in a text file in Unix. I want to:
1. Search and replace all the string date value in column 4 to display the current date(sysdate). Would I use /g?
2. I want to remove the spaces from column 6 and concatenate the first 2 characters of the first column into column 6(the comment field). The comment field always begins with a date and may or may not always have blank spaces before the comments begin.
I have very limited experience with SED and would appreciate any help. I am attaching a sample of the current format, as well as what the text should look like after converting the data.
Thanks
Start Free Trial