- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- trace in csh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 07:35 AM
01-27-2009 07:35 AM
Does anyone know if there is a similar csh command similar to the sh trace command set -x?
TIA, regards
Jose
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 07:50 AM
01-27-2009 07:50 AM
Re: trace in csh
Yes, you have this one and others for tracing:
http://docs.hp.com/en/B2355-60130/csh.1.html
Of course, use 'csh' at your own risk :-)
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 08:00 AM
01-27-2009 08:00 AM
Re: trace in csh
It is not a choice using csh, but SAP's option.
I have alredy looked at faqs.org, but did not find anything.
In the man too. Could you, please, pinpoint the command or the question ?
Regards
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 08:17 AM
01-27-2009 08:17 AM
Re: trace in csh
Add the '-x' to your shell interpreter (shebang) line, like this:
#!/usr/bin/csh -x
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 08:43 AM
01-27-2009 08:43 AM
Re: trace in csh
But there is no way to trace just a few lines in a script, like set -x and set +x in posix ?
Regards
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 09:20 AM
01-27-2009 09:20 AM
Solution"echo"
This variable is set by the -x command line option. If set, all built-in commands and their arguments are echoed to the standard output device just before being executed. Built-in commands are echoed before command and file name substitution, since these substitutions are then done selectively. For non-built-in commands, all expansions occur before echoing."
i believe that "setenv echo..." and "unset echo" may get you what you want
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 09:43 AM
01-27-2009 09:43 AM
Re: trace in csh
Wouldn't you think that "setenv" is a bit of
overkill for something which only this shell
cares about? "man csh" suggests that
something like:
set echo = 1
or:
set verbose = 1 # For "-v"
would work.
One easy way to find out...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2009 10:09 AM
01-27-2009 10:09 AM
Re: trace in csh
don't use 'setenv echo' - do it like this:
...
set echo
...
foreach var (a b c)
echo $var
end
...
unset echo
...
This will trace only the lines between the 'set echo' and 'unset echo'.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2009 01:21 AM
01-28-2009 01:21 AM
Re: trace in csh
On the other hand, if you want to trace/debug an existing script, you have no choice.
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2009 05:38 AM
01-28-2009 05:38 AM
Re: trace in csh
Regards
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2009 04:47 AM
01-29-2009 04:47 AM
Re: trace in csh
It is only the login shell. All of the others are posix shell.
Regards
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2009 04:49 AM
01-29-2009 04:49 AM
Re: trace in csh
Thanks you all for the help.
Regards
Jose