Tracing a shell script!!!


 
Thread Tools Search this Thread
Operating Systems Solaris Tracing a shell script!!!
# 1  
Old 02-17-2008
Tracing a shell script!!!

Hi all,

I would like to know how to trace a shell script..

I meant i used the set -x command and also tried,
$ bash -xv <script name>
but the problem is am a newbie and did not understand what those + and ++ meant at the beginning of each line...(once the execution of the script starts), there were lots of stuff that i couldnt understand....


Also i would like to know if there is a provision like F7 in C/C++ to trace the calls made, line by line...

Thanks
# 2  
Old 02-18-2008
Traditionally, a SysAdmin captures Log The Standard Output (1) & The Standard Error (2) of commands of a script to a file

for example
#execute_command 2>&1 log.file
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Activity Tracing - Using sendmail.

uname -a output Linux server.domain.com 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 i386 GNU/Linux At our company, we have hundreds of employees that access this server for reporting purposes. However, someone was familiar enough with sendmail and used it to send an... (8 Replies)
Discussion started by: abvh
8 Replies

2. Shell Programming and Scripting

tracing processes in shell

Is there a way to have the output from: strace -p 10101 placed in a text file so we can download it and look it over? Thanks Richard (1 Reply)
Discussion started by: ukndoit
1 Replies

3. Shell Programming and Scripting

turn on shell tracing of a makefile

hey, within a shell script file I know how to turn on tracing using "-x" #!/bin/bash -x now I have a complicated makefile which contains lots of `command`, and i would like to trace these `command`, where shall i put the option "-x"? thanks! (1 Reply)
Discussion started by: patiobarbecue
1 Replies

4. UNIX for Dummies Questions & Answers

Script for tracing row in a file

Hi! Sorry for stupid questions, I'm quite unfamiliar win *nix systems I have a script which generates the file which looks like that: 12.11.2008 06.01 0 0 0 2 2 0 0 0 12.11.2008 06.02 0 0 0 0 0 0 0 0... (3 Replies)
Discussion started by: consta.v
3 Replies

5. Shell Programming and Scripting

tracing a ksh script within a ksh script

I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below...... vi hairy bear=`grep bear animals` if then ksh more_animals fi If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies

6. Shell Programming and Scripting

tracing in linux

hello every one can any one help me out i just want to trace what ever i am doing in linux 8.0 in the text mode to be saved in a text file so that at the end i can see my work what i have do. its just like oracle spool so you can see your work at the end . for example what ever command u gave... (2 Replies)
Discussion started by: shary
2 Replies

7. Linux

tracing

hello every one can any one help me out i just want to trace what ever i am doing in linux 8.0 in the text mode to be saved in a text file so that at the end i can see my work what i have do. its just like oracle spool so you can see your work at the end . for example what ever command u gave... (1 Reply)
Discussion started by: shary
1 Replies

8. Shell Programming and Scripting

tracing ethereal traces

Hi All........ i need a perl script that can trace the traces of the ethereal tool. PLZ help me out...............!!!!!!!!! (1 Reply)
Discussion started by: trupti_rinku
1 Replies

9. UNIX for Advanced & Expert Users

Tracing file modifications

Hello all! Is there a way or a utility to trace any kind of file changes in a particular directory on any UNIX machine? The purpose is that in Unix, there are multiple ways of opening and making changes to a file. But internally, there must be something common (a single pipe, etc.) that is... (3 Replies)
Discussion started by: gupta_ca
3 Replies

10. UNIX for Advanced & Expert Users

Tracing a terminal

Hi you all, any of you know how to monitor what is going on in another terminal? I mean if somebody will install an application on my server remotely and I want to "watch" what he is doing. I remember that some one use the "audit" command but now I just can't remember. thanx.:mad: (2 Replies)
Discussion started by: alex blanco
2 Replies
Login or Register to Ask a Question