10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to extract dates from the files and i have different types of files with pattern. I have list file with the patterns and want to date extract based on it in a sh script
Files in the directory :
file1_20160101.txt
file2_20160101_abc.txt
filexyz20160101.txt
list file with... (2 Replies)
Discussion started by: lijjumathew
2 Replies
2. UNIX for Dummies Questions & Answers
Hello Gurus,
I have one file from which I want to extract only dates.
The below is the file format :
=========================
Process ID 16842770
Log Read Checkpoint Oracle Integrated Redo Logs
2014-07-04 17:06:11 <===
SCN 1779.852353022 (7641599172606)
Process ID ... (6 Replies)
Discussion started by: pokhraj_d
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines of data within a log file on a Redhat 5 Linux system.
eg I need all the lines with a particular username over the last 3 minutes.
the log file may read like this, and I want a way to search all the lines extracting all the relevant lines over the last 3... (2 Replies)
Discussion started by: mantis100
2 Replies
4. Shell Programming and Scripting
Hi, i have a filename CRED20102009.txt in a server
20102009 is the date of the file ddmmaaaa format
the complete route is
/dprod/informatica/Fuentes/CRED20102009.csv
i want to extract the date to create a new file named Parameters.txt
I need to create Parameters.txt with this... (6 Replies)
Discussion started by: angel1001
6 Replies
5. Shell Programming and Scripting
Hi.,
My current script extracts only if the date and time are in 3rd and 4th pos.
#!/bin/bash
echo "Enter the file name to extract the timestamp"
read fname
IFILE=$fname
F=$IFILE
IFS="_."
f=($F)
echo "Date ${f} Time ${f}"
How to generalize the script to extract the... (3 Replies)
Discussion started by: IND123
3 Replies
6. Shell Programming and Scripting
Hi , I am having a script which will start a process and appends the process related logs to a log file. The log file writes logs with every line starting with date in the format of: date +"%Y %b %d %H:%M:%S".
So, in the script, before I start the process, I am storing the date as DATE=`date +"%Y... (5 Replies)
Discussion started by: chiru_h
5 Replies
7. Shell Programming and Scripting
Hello All,
I just need to extract the date portion from a apache log file
I am able to do it using the chain of command -
Logfile contents - First record -
==========================
197.130.211.240 - - "GET /jp/index.shtml HTTP/1.1" 200 24255... (4 Replies)
Discussion started by: jambesh
4 Replies
8. Shell Programming and Scripting
Hi Guys,
I am trying to write one ksh script where I have to go to lots of unix boxes and read one text file which will have data like this though this is not complete data. And I just have to extract expire date ( which is 2nd date value 08/31/2009 in the first one ) and the server name ( astro... (0 Replies)
Discussion started by: pareshan
0 Replies
9. Shell Programming and Scripting
Hi,
I have a file where there is a date and time field, the format for it is yyyy-mm-dd hours:mins:sec
the position of date field may vary anywhere in the line and it might be different and it is specified along with the variable AppTimeStamp
how do i extract date and time both from the... (5 Replies)
Discussion started by: prash_b
5 Replies
10. Shell Programming and Scripting
Hi,
I have a file where there is a date field (single line variable length file)
how to extract just the date portion from it
the position of date field may vary anywhere in the line
but will always have the format mm-dd-yyyy
for eg .
xxxxxxxxxxxxxxx09-10-2006xxxxxxxxxxxxxxxxxxxx (5 Replies)
Discussion started by: misenkiser
5 Replies