debugging the shell script with out actually running

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting debugging the shell script with out actually running
# 1  
Old 04-23-2009
debugging the shell script with out actually running

Hello, Some one asked me in the inteview.... The question is,

How do we debug the schell script before even running..... Interviewer
told me one clue... There is SET command to accomplish this... Can any
one tell me what kind of set commands.... Thanks.
# 2  
Old 04-23-2009
set -n
set -o noexec

'man ksh' for details
# 3  
Old 04-23-2009
Great. Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cp not working in shell script but running perfectly from shell

Dear All, I have script. Dest="" IFS=' ' for translation in $(echo $MY_MAP) do t1=$(echo $translation | cut -d"=" -f1) t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1) if then Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2 break; ... (4 Replies)
Discussion started by: yadavricky
4 Replies

2. Shell Programming and Scripting

Shell script debugging

hi all only the weirdest thing happened with me just now. I was debugging a shell script and I found that a step that was supposed to execute later was getting executed prior to another step for no reason. You know any ? i mean have a look at the following command- here it tries to grep... (7 Replies)
Discussion started by: leghorn
7 Replies

3. Shell Programming and Scripting

Shell script running command in different shell

Hi All, Is there any way where we can run few commands with different shell in a shell script ? Let's have an example below, My first line in script reads below, #!/bin/sh However due to some limitation of "/bin/sh" shell I wanted to use "/bin/bash" while executing few... (9 Replies)
Discussion started by: gr8_usk
9 Replies

4. Shell Programming and Scripting

Debugging a beginner shell script...

I have been following a tutorial on bash which has proven to be very helpful. However, i am stuck with a command not found issue when asking for a y/n response from the user. Below is the part of code I believe is giving me grief... I have been trying to work through this for 3 hours now.... Please... (5 Replies)
Discussion started by: brokepunk
5 Replies

5. Shell Programming and Scripting

Debugging shell scripts

Any there any utilities or ways of debugging shell scripts? I know something like: sh -x <script> (1 Reply)
Discussion started by: proactiveaditya
1 Replies

6. Programming

Debugging a running process in GDB

Hi , Any gdb user could see my problem. Let me describe what i want to do. i have a test utility to send message to running process. My interest is to go through to functions calls when my test case starts. In a simple way i want have a code walk for a particular scenario of a test... (1 Reply)
Discussion started by: meet123321
1 Replies

7. UNIX for Advanced & Expert Users

debugging an already running bash script

# ps -ef | grep rc root 13903 1 0 08:56 ? 00:00:00 /usr/sbin/automount --timeout=60 /archive file /etc/auto_archive root 10706 1 0 08:55 ? 00:00:00 /bin/bash /etc/rc.d/rc 3 root 2933 20071 0 19:38 pts/1 00:00:00 grep rc Is there any way to debug the... (1 Reply)
Discussion started by: marcpascual
1 Replies

8. Solaris

Running from Shell Vs running from RC script

Hi, i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell. How do i distinguish whether my script is run by init process or by shell?? Will the command /proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies

9. UNIX for Advanced & Expert Users

which one method is best for debugging the shell script?

Hi All, How to debug the unix shell script? which one is the best way to do the debuging ? suggession would be appreciate Regards, Siva P Bangalore (2 Replies)
Discussion started by: psiva_arul
2 Replies

10. Shell Programming and Scripting

HP-UX Debugging Shell script

Hi, I was using AIX - ksh shell , and inorder to debug shell script I used set -vx to echo all the commands which are being executed. Can anybody tell me the corresponding method in HP-UX - in tcsh shell. Regards Shihab (1 Reply)
Discussion started by: shihabvk
1 Replies
Login or Register to Ask a Question

Featured Tech Videos