alternate to set -x in csh scripts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting alternate to set -x in csh scripts
# 1  
Old 10-06-2008
alternate to set -x in csh scripts

hi all

i want to debug a csh script and i give set -x for that but i get an error.

is there any command similar to set -x for csh scripts?
# 2  
Old 10-11-2008
According to here you can do "set printexitvalue" in tcsh. Every time a function or command returns, tcsh will print the exit value for you. It's not exactly set -x, but it would aid in debugging. TCSH is a freely installable version of csh.

Caveat emptor: I don't use tcsh.
# 3  
Old 10-12-2008
Hi.

On the first screen of man tcsh:
Code:
       -v  Sets the verbose shell variable, so that command  input  is  echoed
           after history substitution.

       -x  Sets  the  echo shell variable, so that commands are echoed immedi-
           ately before execution.

which, combined with the suggestion from otheus should provide a lot of debugging help.

The man pages, Google, and Wikipedia are your friends ... cheers, drl
# 4  
Old 10-12-2008
Man page? WTF is a man page? Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 alternate ways of starting legacy scripts

Scenario: I have installed a service. When I start it by running /etc/init.d/<service> start it generates a massive amount of audit data (auditd) in /var/audit. So much so that running the service for any length of time is inadvisable due to overhead. However if I reboot the system the... (6 Replies)
Discussion started by: penguinpanzer
6 Replies

2. Shell Programming and Scripting

How to set variable permanent in csh?

We are using csh on our AIX platform, if we have to export/set a specific environment variable we use setenv command but its only valid till session. How do we set that variable permanent in our csh AIX? Do we put it in userprofile file or something else? (1 Reply)
Discussion started by: aixusrsys
1 Replies

3. UNIX for Dummies Questions & Answers

Alternate of UNIX scripts in Linux

Hai All, Greetings.... I am doing a migration from Solaris to Linux .There are few scripts (logadm, nfsfind, gsscred_clean, kprop_script) for which I need a alternate in Linux. If somebody can help. Thanks in advance (1 Reply)
Discussion started by: Dilipkumarkm
1 Replies

4. UNIX for Dummies Questions & Answers

How to get value from set of values in csh

Hello. In csh if I declared a variable to be a set of arguments can I retrieve a particular element from that set. My code set files=(`ls`) and I want to get only one file from $files. How can I do that????(It is just an abstract example):wall: Thanks in advance :) (5 Replies)
Discussion started by: FUTURE_EINSTEIN
5 Replies

5. Shell Programming and Scripting

Having trouble with a few beginner csh scripts

Hey, New to the forum and I just had a few questions. I'm writing two scripts that "have" to be written in csh, a menu and a chmod toggle script. I'm having trouble with both of them. For the menu, it works but when the user picks an option (lets say 4) it will go through all the options... (1 Reply)
Discussion started by: chrisH18
1 Replies

6. Shell Programming and Scripting

Debugging csh scripts!?

:wall: So I have to debug some csh scripts, which to me seems like the most painful task period. So far I 'echo' in different places to get an idea of whats going on. I also know the 'csh -x script' command, BUT what do I do when inside that script there is another scipt that is run (this... (0 Replies)
Discussion started by: vas28r13
0 Replies

7. Shell Programming and Scripting

pass parameters from perl to csh scripts

I use csh a lot but I don't really write csh scripts. Now I have a need to implement a security check (written in perl; verify an user input security code) into a csh script. Here is the senario: #csh 1. call the perl script 2. if the perl script returns 'true', pass on; if the perl... (1 Reply)
Discussion started by: Julian16
1 Replies

8. UNIX for Dummies Questions & Answers

Running CSh scripts in Bash

Hi, I have some csh scripts and I want to run them in .bashrc. I use these techniques without any success: . test.csh or csh test.csh The first one assumed that the scripts is a bash script, so showed me errors. The second one finished without giving proper result. Can anybody offer... (6 Replies)
Discussion started by: mjdousti
6 Replies

9. Shell Programming and Scripting

Equivalent of set -o vi in csh

Hi, I am working with two shells on two different users. one is on ksh and one is on csh. In ksh I use set -o vi and I am able to see my history commands by typing esc,- keys. I want the same feature in csh as well how can I do that. Regards, Venkat (3 Replies)
Discussion started by: svenkatareddy
3 Replies

10. UNIX for Dummies Questions & Answers

csh and the set command

Hi, I am trying to write a csh script that will run another csh script, but redirect the output from the second script to an email. my code looks like this. #!/bin/csh ## This script is designed to run the SSM.sh ## then email the output to a specified email address ## it will also display... (2 Replies)
Discussion started by: jagannatha
2 Replies
Login or Register to Ask a Question