[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9809.0. "Error with "at" command ?" by HANDVC::QA () Wed May 14 1997 00:55

    
    I find a problem with the "at" command with digital UNIX V3.2G but the
    problem do not show up on V4.0. Is it a valid problem ?
    
    The symtoms :
    
             I try to use "at" to schedule as follows :
    
             ps | at 1500 may 13
             
          
    
    ,but encounter an error which I received this error message from mailx ?
    
    Do you know the reason? (I had given permission to users to use at
    command)
    
            the message is like that:
    
    /usr/bin/ksh: PID:  not found
    /usr/bin/ksh[2]: syntax error at line 2 : `(' unexpected
    
    what's the workaround ? please advise.
                                                                
    -steve
    
    
T.RTitleUserPersonal
Name
DateLines
9809.1ATZIS2::au7094.aui.dec.com::wimmer_eWed May 14 1997 10:258
What are you expecting?

"at" reads the commands to be scheduled from stdin.
"ps" gives f.e. 
  PID   TTY         S      TIME CMD
  551   console     IW +   0:00.04 /usr.........

Regards Erich
9809.2Wrong command?IOSG::MARSHALLWed May 14 1997 11:427
I suspect .0 meant to do (eg):

echo "ps" | at 1500 may 13

???

Scott
9809.3echo "ps" ?ATZIS2::au7094.aui.dec.com::wimmer_eThu May 15 1997 04:265
Scott, I'm not a Unix or ksh expert, but I tried it on my 
Digital Unix 4.0a system and it works perfectly. I think 
- echo "ps" - doesn't work as expected in your script. 
Try - echo "ps"|cat - instead and see what happens.
Erich 
9809.4Depends on your expectations?IOSG::MARSHALLThu May 15 1997 08:3913
Erich,

I was assuming the base noter wanted to run the 'ps' command at 1500.  So the
string "ps" needs to be sent to the stdin of the 'at' command, hence my
suggestion in .2, which works as I expect it to (see the examples in that 'at'
man page); what were you expecting my command to do?

What "works perfectly" on your system?  The basenoter's command, which sends the
output of an interactive run of 'ps' to 'at'?  If that does for some reason
work, I'm curious what the results are and in what way they are useful?

Ta,
Scott
9809.5sorryATZIS2::au7094.aui.dec.com::wimmer_eThu May 15 1997 10:555
Scott, i misunderstood your reply.
I thought you was the originator of the note and 
told me echo "ps" doesn't work too.
echo "ps"|at .... in any case gives a ps-list at the 
specified time on my system.