10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
2. Shell Programming and Scripting
Hello ,
I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by
EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt
Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies
3. Shell Programming and Scripting
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
4. Shell Programming and Scripting
Hello Mates
I am trying to write a script, which appends and prepends the text in a file.
I tried testing with a small file and it worked fine.
but for the large file, the script is wiping the entire file and adds only the word to be appended in the file.
mv $file_name $file_name.bak
sed... (6 Replies)
Discussion started by: sathyaac
6 Replies
5. Shell Programming and Scripting
I do a lot of TSM work and I embarked on what I thought would be an easy task, and I'd be very happy for any input to save the pounding my keyboard is receiving :]
By default, the output of TSM's console has no timestamping, making it hard to sort through accurately.
This puts my console into... (5 Replies)
Discussion started by: Vryali
5 Replies
6. UNIX for Dummies Questions & Answers
I have a number of dat-files, such as abc.dat, def.dat etc, as follows:
2011-07-01 100.0
2011-07-02 101.0
2011-07-03 101.7
I want to prepend the file with the base file name; so for abc.dat it would result in the following:
abc 2011-07-01 100.0
abc 2011-07-02 101.0
abc 2011-07-03 ... (5 Replies)
Discussion started by: figaro
5 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies
8. UNIX for Dummies Questions & Answers
I would like to know how to take information from a filename and place it into the text of the same file. Let's say I have a file called height_2_width_1.txt containing data that is related to a height of 2 and a width of 1, and the text originally looks like this:
where these two columns... (13 Replies)
Discussion started by: Scatterbrain26
13 Replies
9. Shell Programming and Scripting
I am currently writing a script to compare a file list created over an FTP connection to a local directory.
I have cleaned the FTP file list up so that I just have a raw list of filenames however due to the directory structure employed (both locally and on the ftp site) I need to prepend each line... (6 Replies)
Discussion started by: Dal
6 Replies
10. Shell Programming and Scripting
Hello Dudes,
I have a task to make a unix shell script that should search for a
specific TEXT in a file.If that TEXT is found, shell script should add
a comment statement before that TEXT line.
Ex : LINE 1 xxxxx
LINE 2 xxxx CALL xxxx
LINE 3 xxxx PERFORM UNTIL
if i... (1 Reply)
Discussion started by: kirrushna
1 Replies