10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Experts,
I have a log file that contains a timestamp, I would like to filter record from that file based on timestamp. For example refer below file -
cat sample.txt
Jan 19 20:51:48 mukul-Vostro-14-3468 systemd: pam_unix(systemd-user:session): session opened for user root by (uid=0)... (6 Replies)
Discussion started by: mukulverma2408
6 Replies
2. Shell Programming and Scripting
In unix systems I can call `file` to return me the file type.
file cel.vik
$ cel.vik: ASCII text
How can I append additional information when I create a file such that when I call `file` it returns me that additional information. (2 Replies)
Discussion started by: kristinu
2 Replies
3. Shell Programming and Scripting
Hi,
I have a process which outputs to a log.
Below is the code snippet:
process &> $LOGFILE&
The log file keeps on updating whenever a transaction is processed.
The log file has a time stamp added so every time I kill the process and start the process a new log file is... (4 Replies)
Discussion started by: rajkumarme_1
4 Replies
4. Shell Programming and Scripting
I need to be able to identify files with file timestamps greater than a given timestamp.
I am using the following solution, although it appears to compare files at the "seconds" granularity and I need it at the milliseconds. When I tested my solution, it missed files that had timestamps... (3 Replies)
Discussion started by: nkm0brm
3 Replies
5. Shell Programming and Scripting
Hi all,
I have a tab-delimited text file of size 10Mb. I am trying to count the number of lines using,
grep -c . sample.txtor
wc -l < sample.txt or
awk 'END {print NR}' sample.txtAll these commands shows the count as 1, which means they are reading only the first header line of the file.... (3 Replies)
Discussion started by: mehar
3 Replies
6. Shell Programming and Scripting
If a log file is in the following format
28-Jul-10 ::: Log message
28-Jul-10 ::: Log message
29-Jul-10 ::: Log message
30-Jul-10 ::: Log message
31-Jul-10 ::: Log message
31-Jul-10 ::: Log message
1-Aug-10 ::: Log message
1-Aug-10 ::: Log message
2-Aug-10 ::: Log message
2-Aug-10 :::... (3 Replies)
Discussion started by: vikram3.r
3 Replies
7. Shell Programming and Scripting
Hello. I'm not nearly good enough with awk/perl to create the logfile scraping script that my boss is insisting we need immediately. Here is a brief 3-line excerpt from the access.log file in question (actual URL domain changed to 'aaa.com'):
209.253.130.36 - - "GET... (2 Replies)
Discussion started by: kevinmccallum
2 Replies
8. Shell Programming and Scripting
Hi,
Using sed awk or perl I am trying to do something similar to
https://www.unix.com/shell-programming-scripting/105887-sed-awk-concatenate-lines-until-blank-line-2.html
but my requirement is slightly different. What I am trying to accomplish is to reformat a logfile such that all lines... (4 Replies)
Discussion started by: AlanC
4 Replies
9. Shell Programming and Scripting
I am trying to find a way to list every records inside a file (usually a log file) that are present after a record mathing/greater-then a timestamp supplied by another script.
The timestamp can be anywhere inside the record and it is usually in the standard `date` format (will not look for other... (5 Replies)
Discussion started by: Browser_ice
5 Replies
10. UNIX for Dummies Questions & Answers
Hi
From shell script i am invoking sqlplus to connect to oracle database and then i spool a csv file as with output. What i want to do is to change the file name with timestamp on it so after spooling finish shell script change file name with time stamp.
can someone help me to do that .
Thanks... (2 Replies)
Discussion started by: ukadmin
2 Replies