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
trace(1)						      General Commands Manual							  trace(1)

Name
       trace - trace system calls of programs

Syntax
       trace [options] cmd args...

Description
       The  command  with  no flag arguments traces for the given cmd and args all system calls made and prints a time stamp, the PID, call and/or
       return values and arguments and puts its output in the file trace.dump.

Options
       -f filename
	       Puts dump in file filename.

       -z      Echos arguments only.

       Only one of the following option arguments can be specified at one time.

       -c#     Traces given PIDs and their children.  Up to sixteen PIDs can be specified.

       -g#     Traces given groups only.  Up to sixteen Group IDs can be specified.

       -p#     Traces given PIDs only.	Up to sixteen PIDs can be specified.

       -s#     Traces given system calls only.	Up to sixteen PIDs can be specified.

       -u#     Traces given UIDs only.	Up to sixteen PIDs can be specified.

Examples
       trace -f ls.dump ls -l /dev >ls.out
       runs the cmd ls -l /dev and puts the trace in ls.dump and output in ls.out.
       trace -f csh.trace -p $$ &
       will trace your login shell in the background. To stop the trace just send it a termination signal (that is, kill -TERM trace_pid).

Restrictions
       Due to security, no one, not even the super-user can trace anyone else's programs. This sort of negates some of the usefulness  of  the	-g
       and -u flags.

       The program cannot be traced.

       Only 16 numbers can be given to the -c, -p, -g, -u, and -s flags.

       The kernel configuration file must contain the following:
       options	       SYS_TRACE
       pseudo-device   sys_trace

       In addition, the superuser must use the following command sequence to create the device:
       cd /dev
       MAKEDEV trace
       If both lines are not in the configuration file or if the device is not made, the message "Cannot open /dev/trace" appears.

Files
       /dev/trace     read only character special device for reading syscall data.

       trace.dump     default file for the system call trace data.

See Also
       open(2), close(2), ioctl(2), select(2), read(2), trace(5)

																	  trace(1)
All times are GMT -4. The time now is 12:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy