Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stty: : No such device or address 2

Status
Not open for further replies.

dsm666

IS-IT--Management
Mar 9, 2004
40
US
could someone please advise what could be causing this error. Here is the entire thing: The messages are viewable when I type mail. thanks


Your "cron" job on us351
[ /ceunix/etc/pullFileWithTodaysDate.sh ] && /ceunix/etc/pullFileWithTodaysDate.sh -ftphost hostname -ftpuser user@myhost.come -ftppwd password -remotedir 'dir/dir' -filename "test.txt" -filetrigger '

produced the following output:

stty: : No such device or address

in the script that kicks off the .profile is being called using
. /ceunix/.profile


Thanks so much
 
This looks like a classic case of a script which works fine when run from the command line but fails when run from the cron.

The 'stty' command is used to set or view characteristics about the terminal being used. When a command is run under a cron there is no terminal so stty fails with the message you quote.

What happens when you run
Code:
grep stty /ceunix/etc/pullFileWithTodaysDate.sh

On the internet no one knows you're a dog

Columb Healy
 
In the stty man page look at the -s option
or
in the test man page look at the -t primitive.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
thanks for taking the time.
actually the script runs from cron, but it does produce a lot of information when I type mail.
In that script the user profile is being called which has
stty erase ^H
 
Replace this:
stty erase ^H
with this:
tty -s && stty erase ^H

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top