Sponsored Content
Full Discussion: how to supress the trace
Top Forums Shell Programming and Scripting how to supress the trace Post 302325061 by BubbaJoe on Friday 12th of June 2009 03:17:22 PM
Old 06-12-2009
should be

[[ -e ${FILE}.master ]] || rm ${FILE}.master 2>/dev/null

-e would not give you any command error like No such file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Supress screen output...

I need to suppress the output to the screen. I am appending to a file so do not need the output on the screen in the CLI environment. eg. cat $HOME/somefile >> $HOME/anotherfile I am doing this a number of times with SQL output files so I can look at the finished file not on the screen in the... (3 Replies)
Discussion started by: jagannatha
3 Replies

2. UNIX for Advanced & Expert Users

Supress special chars in vi

Hi, One of our application is producing log files. But if we open the log file in vi or less or view mode, it shows all the special characters in it. The 'cat' shows correctly but it shows only last page. If I do 'cat' <file_name> | more, then again it shows special characters. ... (1 Reply)
Discussion started by: divakarp
1 Replies

3. Shell Programming and Scripting

How do I supress certian output with find?

I am using this command find . -type f -mmin "+$t" > holder Unfortunatley that is also printing files that begin with a period. Such as .bash_history. What can I do to supress files that begin with a period? (1 Reply)
Discussion started by: chrchcol
1 Replies

4. UNIX for Advanced & Expert Users

Supress error message

Hi All this is a simple script #! /bin/bash FileCnt=`ls -lrt $DIR/* | wc -l` echo $FileCnt how could i escape the error msg if there are no files in $DIR ls: /home/sayantan/test/files/cnt/*: No such file or directory 0 Looking forward for a quick reply Regards, Newbie (2 Replies)
Discussion started by: newbie07
2 Replies

5. Shell Programming and Scripting

supress error messages

Hi I have a script which connects to oracle using sqlplus if ! check_sqlplus "$ORACLE_SID" ; then echo "Unable to use sqlplus for sid $ORACLE_SID" return 1 else echo "attempting to connect to database" echo $ORACLE_HOME echo $ORACLE_SID echo "Status before entering... (2 Replies)
Discussion started by: xiamin
2 Replies

6. Shell Programming and Scripting

AWk - supress warning

Hi, I am trying to run a script using awk and sed a few times. The script itself seems to work fine but in a final awk statement it throws up a warning: awk: warning: escape sequence `\.' treated as plain `.' script: ... (3 Replies)
Discussion started by: HugoDarley
3 Replies

7. Shell Programming and Scripting

To Supress *

Hi Team , I want supress the meaning of * while passing it as parameter. I have file which contains file format and destination directory. let say abc* |/home/xyz I had function which will read these values and pass it to another function. Code looks like below func1 () {... (6 Replies)
Discussion started by: gvkumar25
6 Replies

8. Shell Programming and Scripting

Supress text

Hi, I was looking for a simple code to suppress the text between 2 characters. the characters can be of same kind like "*" or "(" and ")". The number of characters are not consistent and could vary. How can I suppress the text between 2 characters? Example: Input : Hello (Within Bracket)... (8 Replies)
Discussion started by: ahmedwaseem2000
8 Replies

9. Shell Programming and Scripting

Supress the psswd from ps in ksh/bash

I am running the ETL job to passing the database username,pssswd positional arguments to shell script (bash) and how can we suppress/hide the password from ps command. (2 Replies)
Discussion started by: pimmit22043
2 Replies

10. Shell Programming and Scripting

Supress java error output to shell

Hello, I know this isn't exactly a shell script question but I'm not sure where else to post it. I am running a java program out of a shell script. There are times when I get an error like, "java.lang.ArrayIndexOutOfBoundsException: 22 at blah, blah at blah, blah ... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
tnfctl_buffer_alloc(3TNF)				       TNF Library Functions					 tnfctl_buffer_alloc(3TNF)

NAME
tnfctl_buffer_alloc, tnfctl_buffer_dealloc - allocate or deallocate a buffer for trace data SYNOPSIS
cc [ flag ... ] file ... -ltnfctl [ library ... ] #include <tnf/tnfctl.h> tnfctl_errcode_t tnfctl_buffer_alloc(tnfctl_handle_t *hndl, const char *trace_file_name, size_t trace_buffer_size); tnfctl_buffer_dealloc(tnfctl_handle_t *hndl); DESCRIPTION
tnfctl_buffer_alloc() allocates a buffer to which trace events are logged. When tracing a process using a tnfctl handle returned by tnfctl_pid_open(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), and tnfctl_internal_open(3TNF)), trace_file_name is the name of the trace file to which trace events should be logged. It can be an absolute path specification or a relative path specification. If it is relative, the current working directory of the process that is calling tnfctl_buffer_alloc() is prefixed to trace_file_name. If the named trace file already exists, it is overwritten. For kernel tracing, that is, for a tnfctl handle returned by tnfctl_kernel_open(3TNF), trace events are logged to a trace buffer in memory; therefore, trace_file_name is ignored. Use tnfxtract(1) to extract a kernel buffer into a file. trace_buffer_size is the size in bytes of the trace buffer that should be allocated. An error is returned if an attempt is made to allocate a buffer when one already exists. tnfctl_buffer_alloc() affects the trace attributes; use tnfctl_trace_attrs_get(3TNF) to get the latest trace attributes after a buffer is allocated. tnfctl_buffer_dealloc() is used to deallocate a kernel trace buffer that is no longer needed. hndl must be a kernel handle, returned by tnfctl_kernel_open(3TNF). A process's trace file cannot be deallocated using tnfctl_buffer_dealloc(). Instead, once the trace file is no longer needed for analysis and after the process being traced exits, use rm(1) to remove the trace file. Do not remove the trace file while the process being traced is still alive. tnfctl_buffer_dealloc() affects the trace attributes; use tnfctl_trace_attrs_get(3TNF) to get the latest trace attributes after a buffer is deallocated. For a complete discussion of tnf tracing, see tracing(3TNF). RETURN VALUES
tnfctl_buffer_alloc() and tnfctl_buffer_dealloc() return TNFCTL_ERR_NONE upon success. ERRORS
The following error codes apply to tnfctl_buffer_alloc(): TNFCTL_ERR_BUFEXISTS A buffer already exists. TNFCTL_ERR_ACCES Permission denied; could not create a trace file. TNFCTL_ERR_SIZETOOSMALL The trace_buffer_size requested is smaller than the minimum trace buffer size needed. Use trace_min_size of trace attributes in tnfctl_trace_attrs_get(3TNF) to determine the minimum size of the buffer. TNFCTL_ERR_SIZETOOBIG The requested trace file size is too big. TNFCTL_ERR_BADARG trace_file_name is NULL or the absolute path name is longer than MAXPATHLEN. TNFCTL_ERR_ALLOCFAIL A memory allocation failure occurred. TNFCTL_ERR_INTERNAL An internal error occurred. The following error codes apply to tnfctl_buffer_dealloc(): TNFCTL_ERR_BADARG hndl is not a kernel handle. TNFCTL_ERR_NOBUF No buffer exists to deallocate. TNFCTL_ERR_BADDEALLOC Cannot deallocate a trace buffer unless tracing is stopped. Use tnfctl_trace_state_set(3TNF) to stop tracing. TNFCTL_ERR_INTERNAL An internal error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtnfc | +-----------------------------+-----------------------------+ |MT Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
prex(1), rm(1), tnfxtract(1), TNF_PROBE(3TNF), libtnfctl(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), tnfctl_inter- nal_open(3TNF), tnfctl_kernel_open(3TNF), tnfctl_pid_open(3TNF), tnfctl_trace_attrs_get(3TNF), tracing(3TNF), attributes(5) SunOS 5.11 4 Mar 1997 tnfctl_buffer_alloc(3TNF)
All times are GMT -4. The time now is 10:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy