Sponsored Content
Top Forums Shell Programming and Scripting Cannot get this bash/expect script to run under a crontab Post 302663213 by mrkool on Wednesday 27th of June 2012 05:27:02 PM
Old 06-27-2012
put this statement in the crontab

Code:
*/5 * * * * /ftp/office_in_a_box/rap.sh 2>/tmp/rap.err 1>/tmp/rap.out
 
got this result

[bluecoat_ftp@bb-va01-sv55-nm office_in_a_box]$ cat /tmp/rap.err 
stty: impossible in this context
are you disconnected or in a batch, at, or cron script?stty: ioctl(user): bad file number
    while executing
"stty echo "
stty: impossible in this context
are you disconnected or in a batch, at, or cron script?stty: ioctl(user): bad file number
    while executing
"stty echo "
stty: impossible in this context
are you disconnected or in a batch, at, or cron script?stty: ioctl(user): bad file number
    while executing
"stty echo "
stty: impossible in this context
are you disconnected or in a batch, at, or cron script?stty: ioctl(user): bad file number
    while executing
"stty echo "


Last edited by methyl; 06-27-2012 at 08:24 PM.. Reason: code tags
This User Gave Thanks to mrkool For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect script doesn't work under crontab

Hi All, Using Expect script when I run it manually it works. But when I put the entry in crontab, the job is still running after 15 hours. The script was created as root. I don't think it's a permission issue. Any idea? This is what I have under root crontab... 00 18 * * 1-5... (4 Replies)
Discussion started by: samnyc
4 Replies

2. Shell Programming and Scripting

how to run shell script inside expect script?

I have the code like this : shell script continues ... .... expect -c" spawn telnet $ip expect "login:" send \"$usrname\r\" expect "Password:" send \"$passwd\r\" expect "*\>" send \"$cmdstr\r\" ... (1 Reply)
Discussion started by: robbiezr
1 Replies

3. Shell Programming and Scripting

Expect script on crontab

Hi All, I have an expect script called sftp to transfer using SFTP below : # more sftp #!/usr/local/bin/expect # Initialisation set authFile "/home/ap1030/transfer/.password" # Check the authorisation file exists if {!} { ;# Does file exist send_user "$authFile does not exist;... (6 Replies)
Discussion started by: ap1030
6 Replies

4. Programming

Expect script to run a Shell script on remote server

Hi All, I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands. spawn ssh $uid@$host expect "password:" send "$password\r" expect "*\r" send... (2 Replies)
Discussion started by: yashwanthsn
2 Replies

5. Shell Programming and Scripting

Expect Script Not working with Crontab

I have the following expect script sitting on a Linux box. === #!/usr/bin/expect -f # # backup.expect # # Expect script to backup a firewall via a SSH session # # set firewall set username set password set prompt set filename match_max 50000 spawn ssh -l... (2 Replies)
Discussion started by: alagondar
2 Replies

6. Shell Programming and Scripting

Use expect to run an interactive shell script?

Hi all, I have a bit of a vexing issue here and I'm not certain how best to go about it. Basically, I want to run a shell script and automate the user prompt of hitting 1 to fully uninstall Symantec Anti-Virus for OS X. Would expect be the best way to do this? (5 Replies)
Discussion started by: prometheon123
5 Replies

7. UNIX for Advanced & Expert Users

Unable to run the script on remote machine Using Expect script

Not able to execute the file in remote host using except utility I am automating the SFTP keys setp process: So i created the expect script for controlling the output of shell below is my main code: Code: #!/usr/bin/expect set fd set password close $fd set df set app close $df... (1 Reply)
Discussion started by: Manoj Bajpai
1 Replies

8. Shell Programming and Scripting

Expect script not working in crontab with minicom

Hi All, I am testing expect script in command prompt without issue, but in crontab it is not working, i check the output error as below: #cat /var/log/testexp.log spawn minicom -C /var/log/minicom1.log No cursor motion capability (cm) AT+COPS=? I am new in scripting, together... (1 Reply)
Discussion started by: elingtey
1 Replies

9. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

10. Shell Programming and Scripting

Bash script acting funny when run from Crontab

Hello, first time here. I have a script that seems to ignore the if statement when run from the cron. I am using Ubuntu 12.10 #!/bin/bash DOWN=/usr/sbin/dcon UP="pon dsl-provider" LOG=/var/log/dsl-reconnect.log RECV=`ifconfig 2>&1|grep ppp0|cut -d , -f 5|cut -d " " -f 1` if ] then... (1 Reply)
Discussion started by: mkoster
1 Replies
odld(8) 						      System Manager's Manual							   odld(8)

NAME
odld - Daemon that supports the Software On-Demand Loading (SoftODL) service SYNOPSIS
/usr/sbin/odld user-id group-id odl-db OPERANDS
Identifies the user process. Specifies the group to which the user belongs. Specifies the location of font files accessed by the daemon. DESCRIPTION
The odld daemon supports the Software On-Demand Loading (SoftODL) service. This service handles font files for user-defined characters. It is available only when optional Tru64 UNIX subsets with software for Chinese, Japanese, or Korean are installed on the system. The odld daemon processes the font loading requests issued by the Asian terminal driver (atty) through the utx pseudo device driver. The odl parameter of the stty command spawns the odld daemon (see stty(1)). The stty command includes additional parameters that affect SoftODL operation. FILES
The utx device special files SEE ALSO
Commands: stty(1), utxd(8) Files: cp_dirs(4), atty(7), utx(7) Others: odl(5) odld(8)
All times are GMT -4. The time now is 07:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy