- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cshell and at jobs
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
тАО11-03-2008 06:31 AM
тАО11-03-2008 06:31 AM
I have the following cshell script (SAP adm id's use csh by default - don't ask me why nor don't ask me to change it).
#!/bin/csh
startsap r3 >& /dev/null
set returncode=$status
switch ($returncode)
case '0':
echo "SAP started"
breaksw
default:
echo "SAP startup failed with returncode $returncode"
mailx -s "SAP shutdown failed on `uname -n`" gwild < $returncode
breaksw
endsw
exit 0
Running as the user is fine, but it fails as an at job:
Subject: at
sh[34]: /dev/null: Generated or received a file descriptor number that is not valid.
sh[36]: Syntax error at line 36 : `(' is not expected.
*************************************************
Cron: The previous message is the standard output
and standard error of one of your at commands.
I think I know partially why, as when the job is submitted it says:
at -f $HOME/zatjobtest.csh -t 200811030726
warning: commands will be executed using /usr/bin/sh
So why doesn't it spawn a csh?
Rgds...Geoff
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2008 06:36 AM
тАО11-03-2008 06:36 AM
Re: cshell and at jobs
From the at(1) man page:
DIAGNOSTICS
...
If your login shell is not the POSIX shell (/usr/bin/sh), at and batch produce a warning message as a reminder that at and batch jobs are executed using /usr/bin/sh.
HP-Server-Literate since 1979
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2008 06:38 AM
тАО11-03-2008 06:38 AM
Re: cshell and at jobs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2008 06:43 AM
тАО11-03-2008 06:43 AM
SolutionYou shouldn't be caught dead using the scummy C shell.
>So why doesn't it spawn a csh?
Because you need to invoke it as a script, not as a file:
at <
EOF
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2008 06:55 AM
тАО11-03-2008 06:55 AM
Re: cshell and at jobs
Thanks....Geoff