Trying to manage an inherited Ksh script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Trying to manage an inherited Ksh script
# 1  
Old 08-15-2007
Trying to manage an inherited Ksh script

Hi
I am trying to get to know a script I have inherited. The original author is no longer available.
Does anyone know if there is a utility to parse a ksh script and generate a report/output which details all the defined functions and their arguments? Maybe even provide a 'call trace' of how the script proceeds - which I confess is what I would *really* like.
I know I can simply read through and generate this but it is not a small piece of code....
any ideas, advice or guidance would be most appreciated
# 2  
Old 08-15-2007
If you can run the script to test, then use "set -x" at the beginning of the script. This will run the script in debug mode and allow you to see what is happening where. To get details of what happens inside each function call, you will have to use "set -x" inside each function.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to Parse An Inherited Command/Routine

I am am one of these people that it isn't good enough just to say, "Here, try this...". it is important for me to understand how and why something works (or doesn't work.) All that being said, I am trying to parse out a command that we use that was handed down to me by someone I can no longer... (3 Replies)
Discussion started by: he204035
3 Replies

2. Shell Programming and Scripting

[BASH] Script to manage background scripts (running, finished, exit code)

Heyas, Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p The last point for motivation was... (17 Replies)
Discussion started by: sea
17 Replies

3. Shell Programming and Scripting

shell script help needed to manage FTP automation

Hi, I am very new in shell scripting. Have managed to prepare a script which will work to download data to local directory. But facing below problem. :wall: Please help me out. Thanks in advance. Problem: 1. I am unable to use delete command to delete data in the ftp location (I have... (2 Replies)
Discussion started by: ImranBD
2 Replies

4. UNIX for Advanced & Expert Users

Permission inherited by users

Hi Felas I am running Fedora and have this issue on my system: I have the following users: jane:x:552:100::/usr1/users/jane:/bin/bash jules:x:553:100::/usr1/users/jules:/bin/bash I have the following group which all users belong to: lab:x:100:root,jules,jane I have the... (4 Replies)
Discussion started by: ndaka123488
4 Replies

5. Shell Programming and Scripting

manage an interactive script on a remote host

OS~AIX 6.1 I'm running an interactive shell script i.e.,waits for a user response a few times while executing, after doing ssh to a AIX server. I'm just wondering what options I have if the ssh connection to the server is lost while executing the script, do I have to run the script again, which in... (2 Replies)
Discussion started by: mbak
2 Replies

6. AIX

Inherited VIO server an LPARs

Lucky me, someone has installed a server and got it running with the best intentions, but leaving me a headache. :wall: We have a simple p520 with 4 disks. 2x145Gb & 2x300Gb. The smaller disk pair have been built into a VIO mirrored rootvg, and quite right too. The other two disks form a... (3 Replies)
Discussion started by: rbatte1
3 Replies

7. Shell Programming and Scripting

import var and function from ksh script to another ksh script

Ih all, i have multiples ksh scripts for crontab's unix jobs they all have same variables declarations and some similar functions i would have a only single script file to declare my variables, like: var1= "aaa" var2= "bbb" var3= "ccc" ... function ab { ...} function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies

8. Shell Programming and Scripting

Manage starting point in shell script.

Hi, I'd like to run a script with an optional starting point. Meaning that if no parameter for the script => Do everything, otherwise start from the point specified in the parameter and continue till the end. I thought of using the "case ..." but I have no result. Script: # ---------------... (6 Replies)
Discussion started by: ai_dba
6 Replies

9. SCO

Inherited server - need help

I have inherited admin duties on an old server running SCO Open Server 5. No changes have been made to this thing for a very long time. The server has started randomly disconnecting itself from the network. I have to reboot the server to get it to find the network again. It happens about once a... (3 Replies)
Discussion started by: jmickens
3 Replies

10. Shell Programming and Scripting

How to manage multiple versions of a set of shell and SQL script utilities

Hi all --- I have the need to manage multiple versions of a set of utility scripts -- both shell and SQL and other .dat files. I am wondering if anyone out there knows of a good way to "PATH" to SQL and text files in a way similar to how PATH facilitates finding executables in a pre-specified... (2 Replies)
Discussion started by: DennisB
2 Replies
Login or Register to Ask a Question