- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TCSH and CSH commands
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
Discussions
Discussions
Forums
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
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
тАО07-15-2009 10:34 PM
тАО07-15-2009 10:34 PM
TCSH and CSH commands
Will you please help me in converting the following commands to TCSH and CSH commands?
commands:-
tty > $1/.ttyvalue
ps -ef | grep $1 | tr -s ' ' | cut -d ' ' -f3 > $1/.processvalue
while :
do
sleep 10
done
Thanks,
Ganeshraj.S
- Tags:
- csh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 03:22 AM
тАО07-16-2009 03:22 AM
Re: TCSH and CSH commands
#!/usr/bin/ksh
tty > $1/.ttyvalue
ps -ef | grep $1 | tr -s ' ' | cut -d ' ' -f3 > $1/.processvalue
while : ; do # Not sure why you want this infinite loop here?
sleep 10
done
And from your scummy C shell:
call_real_shell_for_something user-name
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 07:30 AM
тАО07-16-2009 07:30 AM
Re: TCSH and CSH commands
must admit, I'm at a loss as to what you would do with this infinite loop, as the loop doesn't actually "do" anything, so it seems rather pointless
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2009 07:51 PM
тАО07-19-2009 07:51 PM
Re: TCSH and CSH commands
Thanks for your replies. :)
I need to make sure these commands executes in TCSH and CSH shell.
Is that including(at 1st line) #!/usr/bin/tcsh will work for tcsh and #!usr/bin/csh will work for csh?
-Kindly dont worry about the infinite loop. We will take care of it. :)
Since I never worked on these shells, I need assistance.
-Ganeshraj.S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2009 03:56 AM
тАО07-20-2009 03:56 AM
Re: TCSH and CSH commands
> I need to make sure these commands executes in TCSH and CSH shell.
Why not simply test your scripts?
> Is that including(at 1st line) #!/usr/bin/tcsh will work for tcsh and #!usr/bin/csh will work for csh?
Yes, all scripts should specify the interpreter that they want to use. This is done with the 'shebang' line. For the HP-UX Posix shell this is:
#!/usr/bin/sh
> Since I never worked on these shells, I need assistance.
I have never used the 'tcsh' but I understand it is quite viable if that is your choice. The 'csh' is brain-damaged and should be avoided:
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
Whatever you elect to do, do _NOT_ change 'root's shell. It must remain as '/sbin/sh' [ a staticly linked version of the Posix shell ] or your server will be rendered un-startable!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2009 06:09 AM
тАО07-20-2009 06:09 AM
Re: TCSH and CSH commands
GaneshrajS: "Since I never worked on these shells, I need assistance."
Then you might start by looking at the aforementioned "man" page, in particular the item noted.