Sponsored Content
Top Forums Shell Programming and Scripting Expect Script not running from cron. Full Paths used Post 302873107 by popeye on Monday 11th of November 2013 07:16:35 AM
Old 11-11-2013
To solve the problem

Use

Code:
expect ">"
send "lcd /home/popeye\r"
expect ">"
send "mput /home/popeye/Result*\r"
expect ">"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

expect script in cron

I wrote a script using 'expect' tool to change the password of my login id, every fortnight. And I had put it as a cron job. The cron job is throwing an error ld.so.1: /usr/local/bin/expect: fatal: libtcl8.3.so: open failed: No such file or directory The environment variables are set... (4 Replies)
Discussion started by: Deepa
4 Replies

2. UNIX for Dummies Questions & Answers

expect and stty paths are different and resulting in error.

Hello, i am using expect to automate file transfers to and fro with a sftp server. below is the script i am creating and executing in the main program. but i am getting the following error: the main program that creates and runs this script looks for words like "not found" in... (6 Replies)
Discussion started by: The Nemi
6 Replies

3. Shell Programming and Scripting

calling expect script in ksh is failing via cron

I'm calling an expect script via a ksh script in cron and it is failing. The script runs fine if i run it manually. Does anyone know if it is an issue with compatibilty and if there is a way around it? (2 Replies)
Discussion started by: bhatia
2 Replies

4. Shell Programming and Scripting

How to write an expect script to check if a process is running?

I'm new to expecting and i want to create a script to ssh to a device,check is a process is running and display that the process is running or not.This is what i have so far After executing this script i get an error. #!/usr/bin/expect set timeout -1 set ip "machine ip goes here" set... (5 Replies)
Discussion started by: icchi
5 Replies

5. Shell Programming and Scripting

Using expect script with AIX's SMIT in cron

My searches turned up nothing relevant, so I apologize if this has already been looked at. I am trying to run an expect script from a Solaris machine, that ssh's into an AIX machine, and interacts with a SMIT created menu system that runs a few backups for me. The expect script runs fine when... (0 Replies)
Discussion started by: Mariognarly
0 Replies

6. Shell Programming and Scripting

how to debug an expect script running on a tomcat server

Hello everyone, I have a small expect script as follows; #!/usr/bin/expect -f set force_conservative 0 ;# set to 1 to force conservative mode even if ;# script wasn't run conservatively originally if {$force_conservative} { set send_slow {1 .1} proc send {ignore arg}... (1 Reply)
Discussion started by: randeel
1 Replies

7. Shell Programming and Scripting

Expect script cronjob running but dying prematurely

I have an Ubuntu machine that I'd like to update automatically. I've written an expect script to run the aptitude package manager and update my packages. Essentially it does: aptitude update && aptitude upgrade while answering "yes" at the appropriate time. It works quite nicely when run... (4 Replies)
Discussion started by: CluelessPerson
4 Replies

8. Shell Programming and Scripting

ps command showing full code of running script

Hi, I have a script running while rsync command is fired to push some files. The output of rsync cmd has been redirected to the script which is used to generate log files containing progress info with formatting. when I enter ps -ef | grep rsync it shows the full scripting code on the cmd line... (2 Replies)
Discussion started by: rajeevra
2 Replies

9. Shell Programming and Scripting

expect script not running in cron "Urgent"

I wrote a script to download the files from sftp location to local. while running the script manually its working fine. when i schedule the same in cron its not working.... :wall::wall: here is the script: #!/bin/bash ... (2 Replies)
Discussion started by: ganga39
2 Replies

10. Shell Programming and Scripting

Expect script not executing via cron

Hello All, I'm having an issue getting an expect script to run as a cron job. The script executes fin if I run it from the command line but I get nothing when trying to run it as a cron job. I've researched other forums and threads and there have been references to the environment, or lack... (16 Replies)
Discussion started by: KingT617
16 Replies
BB-SERVICES(5)							File Formats Manual						    BB-SERVICES(5)

NAME
bb-services - Configuration of TCP network services SYNOPSIS
$BBHOME/etc/bb-services DESCRIPTION
bb-services contains definitions of how bbtest-net(1) should test a TCP-based network service (i.e. all common network services except HTTP and DNS). For each service, a simple dialogue can be defined to check that the service is functioning normally, and optional flags deter- mine if the service has e.g. a banner or requires SSL- or telnet-style handshaking to be tested. FILE FORMAT
bb-services is a text file. A simple service definition for the SMTP service would be this: [smtp] send "mail quit " expect "220" options banner This defines a service called "smtp". When the connection is first established, bbtest-net will send the string "mail quit " to the service. It will then expect a response beginning with "220". Any data returned by the service (a so-called "banner") will be recorded and included in the status message. The full set of commands available for the bb-services file are: [NAME] Define the name of the TCP service, which will also be the column-name in the resulting display on the test status. If multiple tests share a common definition (e.g. ssh, ssh1 and ssh2 are tested identically), you may list these in a single "[ssh|ssh1|ssh2]" definition, separating each service-name with a pipe-sign. send STRING expect STRING Defines the strings to send to the service after a connection is established, and the response that is expected. Either of these may be omitted, in which case bbtest-net(1) will simply not send any data, or match a response against anything. The send- and expect-strings use standard escaping for non-printable characters. " " represents a carriage-return (ASCII 13), " " represents a line-feed (ASCII 10), " " represents a TAB (ASCII 8). Binary data is input as "xNN" with NN being the hexadecimal value of the byte. port NUMBER Define the default TCP port-number for this service. If no portnumber is defined, bbtest-net(1) will attempt to lookup the portnum- ber in the standard /etc/services file. options option1[,option2][,option3] Defines test options. The possible options are banner - include received data in the status message ssl - service uses SSL so perform an SSL handshake telnet - service is telnet, so exchange telnet options FILES
$BBHOME/etc/bb-services SEE ALSO
bbtest-net(1) Xymon Version 4.2.3: 4 Feb 2009 BB-SERVICES(5)
All times are GMT -4. The time now is 04:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy