I have a file which contains timestamp and date in the second column. If the line contains one of the word then it need to be replace like below. Any help is appreciated.
File:
O/P:
Moderator's Comments:
Code tags for data please
------ Post updated at 06:21 PM ------
------ Post updated at 06:27 PM ------
------ Post updated at 06:34 PM ------
sorry, I have entered dateformat instead of timestamp but still its not working
------ Post updated at 07:40 PM ------
If I execute the statement in a separate awk statement then its working fine but If I add in the else condition then I am getting error.
:confused: There is a flat file on my system which contains email addreses of people in my company. This file is utilized when sending notifications for various things. However nobody knows where this file is located or what it is named. The only thing we know is the email address of a user who... (4 Replies)
I was just thinking if there is a way where i can dynamically rename files based on the actual file content.
I have a load of pdf's which have been named wrongly. (We normally put date first, then brief description, then title)
So can a script be written wherin, it pulls out the date and title... (2 Replies)
I have a Transaction File coming into the system. In this file, in all records the relevant data is as follows-
Position 1:10 -> Transaction Code
Position 252:255 -> 4 digit business code
Now based on these 2 fields I have to alter value in Transaction code (Position 1:10)... (6 Replies)
Hi,
I want to replace a word in a file which occurs after a particular word.
For example :
$cat file.txt
CASE
WHEN
AND c1 = 'I'
AND c2= '2'
THEN 1
WHEN
AND c1= 'I'
AND c2= '0'
THEN 2
So in this example i want to replace... (4 Replies)
Arun kumar something somehting Enterting in to the line
.
.
.
.
Some text text Finshing the sentence
Some other text
.
.
.
.
Again something somehting Enterting in to the line
.
.
.
.
.
.
Again text text Finshing the sentence (6 Replies)
Hi,
I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Hi Guru's,
I am new to shell scripting. I have a unique requirement:
The system generates a single pdf(/tmp/ABC.pdf) file with Invoices for Multiple Customers, the format is something like this:
Page1 >> Customer 1 >>Invoice1 + invoice 2 >> Page1 end
Page2 >> Customer 2 >>Invoice 3 + Invoice 4... (3 Replies)
Hi Gurus,
I am SQL developer and new unix user.
I need to create some file and file content based on information in two files.
I have one file contains basic information below file1 and another exception file file2. the rule is if "zone' and "cd" in file1 exists in file2, then file name is... (13 Replies)