Sponsored Content
Top Forums Shell Programming and Scripting print contents of any file within some timeframe Post 302292484 by jim mcnamara on Saturday 28th of February 2009 05:19:46 AM
Old 02-28-2009
Do the log entries have a timestamp?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search for the contents in many file and print that file using shell script

hello have a file1 H87I Y788O T347U J23U and file2 J23U U887Y I99U T556U file3 I99O J99T F557J file4 N99I T666U R55Y file5 H87I T347U file6 H77U R556Y E44T file7 Y788O K98U H8I May be using script we can use file1 to search for all the files and have the output H87I file5... (3 Replies)
Discussion started by: cdfd123
3 Replies

2. Shell Programming and Scripting

awk - print file contents except regex

Hello, I have a file which has user information. Each user has 2 variables with the same name like Email: testuser1 Email: testuser1@test.com Email: testuser2 Email: testuser2@test.com My intention is to delete the ones without the '@' symbol. When I run this statement awk '/^Email:/&&!/@/'... (6 Replies)
Discussion started by: rmsagar
6 Replies

3. Shell Programming and Scripting

find file and print only contents with a hit by grep

Hi, can someone help me. I have some files and search a content in this files. If i have a hit I will print a output: filename:content But are more hits in one file: The output is always filename:content E.G. Seach about "three" file1 {one, two, three, four, three} file2... (5 Replies)
Discussion started by: Timmää
5 Replies

4. Shell Programming and Scripting

Read contents of the file and print

AT ---------- 0 Elapsed: 00:00:00.02 SO ---------- 0 Elapsed: 00:00:00.01 SE ---------- 0 Elapsed: 00:00:00.01 CR ---------- (4 Replies)
Discussion started by: sandy1028
4 Replies

5. Shell Programming and Scripting

script to read the contents of a file and print

Hi, Need help in writing a script to read the contents of this file test Test 00a 00b 00c 00d 00e 00f where it need to read each line to give a display such as form meta from dev 00a , config=Striped; add dev 00b:00f to meta 00a Can any one help me in writing this script (2 Replies)
Discussion started by: praveen1516
2 Replies

6. UNIX for Dummies Questions & Answers

How to search two strings in a file and print the contents in between to a file

I have a file called po.txt. Here is the content of the file: <!DOCTYPE PurchaseOrderMessage (View Source for full doctype...)> - <PurchaseOrder> - <Header> <MessageId>cdb3062b-685b-4cd5-9633-013186750e10</MessageId> <Timestamp>2011-08-01T13:47:23.536-04:00</Timestamp> </Header> -... (4 Replies)
Discussion started by: webbi
4 Replies

7. Shell Programming and Scripting

Run a program-print parameters to output file-replace op file contents with max 4th col

Hi Friends, This is the only solution to my task. So, any help is highly appreciated. I have a file cat input1.bed chr1 100 200 abc chr1 120 300 def chr1 145 226 ghi chr2 567 600 unix Now, I have another file by name input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies

8. Shell Programming and Scripting

How to print contents of file when the file path is in a variable?

The file f1 contains the text "body" (shell prompt is "$"): $ cat ~/path/f1 body How to print contents of f1 when the f1 path is in a variable? Here is my failed attempt: $ f1="~/path/f1" $ echo $f1 ~/path/f1 $ cat $f1 cat: '~/path/f1': No such file or directory (2 Replies)
Discussion started by: wolfv
2 Replies

9. UNIX for Beginners Questions & Answers

sed read contents of file and print value another file

Trying to use sed to insert the contents of a file into the end of each line in another file file1 This is a line Here is another line This is yet another line Here is a fourth line file2 TEXT desired output This is a line TEXT Here is another line TEXT This is yet another... (6 Replies)
Discussion started by: jimmyf
6 Replies

10. UNIX for Beginners Questions & Answers

Bash command to find a file and print contents

I need to find a file and print its contents I am trying but it is not working find -path /opt/app-root/src/.npm/_logs -type f -name "*.log" -print Version $ bash -version GNU bash, version 4.4.12(1)-release (x86_64-pc-msys) (1 Reply)
Discussion started by: SVRao19056
1 Replies
POSIX_TRACE_CLOSE(P)					     POSIX Programmer's Manual					      POSIX_TRACE_CLOSE(P)

NAME
posix_trace_close, posix_trace_open, posix_trace_rewind - trace log management (TRACING) SYNOPSIS
#include <trace.h> int posix_trace_close(trace_id_t trid); int posix_trace_open(int file_desc, trace_id_t *trid); int posix_trace_rewind(trace_id_t trid); DESCRIPTION
The posix_trace_close() function shall deallocate the trace log identifier indicated by trid, and all of its associated resources. If there is no valid trace log pointed to by the trid, this function shall fail. The posix_trace_open() function shall allocate the necessary resources and establish the connection between a trace log identified by the file_desc argument and a trace stream identifier identified by the object pointed to by the trid argument. The file_desc argument should be a valid open file descriptor that corresponds to a trace log. The file_desc argument shall be open for reading. The current trace event timestamp, which specifies the timestamp of the trace event that will be read by the next call to posix_trace_getnext_event(), shall be set to the timestamp of the oldest trace event recorded in the trace log identified by trid. The posix_trace_open() function shall return a trace stream identifier in the variable pointed to by the trid argument, that may only be used by the following functions: posix_trace_close() posix_trace_get_attr() posix_trace_eventid_equal() posix_trace_get_status() posix_trace_eventid_get_name() posix_trace_getnext_event() posix_trace_eventtypelist_getnext_id() posix_trace_rewind() posix_trace_eventtypelist_rewind() In particular, notice that the operations normally used by a trace controller process, such as posix_trace_start(), posix_trace_stop(), or posix_trace_shutdown(), cannot be invoked using the trace stream identifier returned by the posix_trace_open() function. The posix_trace_rewind() function shall reset the current trace event timestamp, which specifies the timestamp of the trace event that will be read by the next call to posix_trace_getnext_event(), to the timestamp of the oldest trace event recorded in the trace log identified by trid. RETURN VALUE
Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number. If successful, the posix_trace_open() function stores the trace stream identifier value in the object pointed to by trid. ERRORS
The posix_trace_open() function shall fail if: EINTR The operation was interrupted by a signal and thus no trace log was opened. EINVAL The object pointed to by file_desc does not correspond to a valid trace log. The posix_trace_close() and posix_trace_rewind() functions may fail if: EINVAL The object pointed to by trid does not correspond to a valid trace log. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
None. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
posix_trace_get_attr() , posix_trace_get_filter() , posix_trace_getnext_event() , the Base Definitions volume of IEEE Std 1003.1-2001, <trace.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 POSIX_TRACE_CLOSE(P)
All times are GMT -4. The time now is 09:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy