02-08-2019
How did you run that code?
executing the code from a terminal and your login shell ( and so interactive ) or batch mode ( using cron or at or any other scheduler ) ?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Experts,
I hav a question for you..
Can we open a new window(SunOS 5.10,Putty) by a unix_command from the one we're on? Is it possible?
Thanks. (2 Replies)
Discussion started by: Hunter85
2 Replies
2. Shell Programming and Scripting
Can 'spawn' script be used more than once in a given expect script ??
What I'm trying to do is, first log-into a remote server through one 'ssh' spawn com and then from there log-into another server using a secod 'ssh' spawn command. But this approach is not working... the second ssh attempt... (1 Reply)
Discussion started by: clakkad
1 Replies
3. Shell Programming and Scripting
Hi,
I require need help in two aspects actually:
1) Fatal error that gets generated as %F% from a log file say ABClog.dat to trigger a mail. At present I manually grep the log file as <grep %F% ABClog.dat| cut-d "%" -f1>. The idea is to use this same logic to grep the log file which is... (1 Reply)
Discussion started by: zico1986
1 Replies
4. Shell Programming and Scripting
( sleep 3
echo ${LOGIN}
sleep 2
echo ${PSWD}
sleep 2
while read line
do
echo "$line"
PID=$?
sleep 2
kill -9 $PID
done < temp
sleep 5
echo "exit" ) | telnet ${HOST}
while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies
5. Shell Programming and Scripting
Hi all,
I have a script that runs sftp with expect so I can login and send a file in a cronjob. I've installed this on a couple other servers and it has been fine. However, this time on this machine, it seems to be giving me an issue. It won't move past the spawn sftp command and return a... (3 Replies)
Discussion started by: ltyrrell
3 Replies
6. Shell Programming and Scripting
Hello,
I am working on an Urdu to Hindi dictionary which has the following structure:
a=b
a=c
n=d
n=q
and so on.
i.e. Headword separated from gloss by a =
I am giving below a live sample
بتا=बता
بتا=बित्ता
بتا=बुत्ता
بتان=बतान
بتان=बितान
بتانا=बिताना
I need the following... (3 Replies)
Discussion started by: gimley
3 Replies
7. Red Hat
Hi all,
I want to run the following command from my main prompt :
# spawn bash
but I get the following error:
spawn: Command not found.
For this to work , I first have to go into expect.
#expect
expect1.1>spawn bash
spawn bash
564
expect1.2>
Is there any way I can skip the... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies
8. Red Hat
Dear Concern,
I want to run following script in RHEL 6.3.
$ cat sftp_upload.sh
#!/usr/bin/expect
spawn sftp -oPort=434 bkashtopup@172.16.252.59
expect "*?assword:*"
send "bkashtopup1234\n"
send "lcd /BI/application/report/script/daily/daily_bkash_itopup_detail\r"
expect sftp>
... (3 Replies)
Discussion started by: makauser
3 Replies
9. Shell Programming and Scripting
Hi,
I am writing a script to automate installation of java in shell script.
#!/bin/sh
#!/usr/bin/expect
ls -la | grep jdk* | rpm -ivh ./jdk*.rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_71/bin/java 2
spawn alternatives --config java
expect "Enter to keep the current... (5 Replies)
Discussion started by: boby.kumar
5 Replies
10. What is on Your Mind?
Today, I noticed some errors in our SSL cert renewal log files, mostly related to domains where the IP address had changed. Concerned about this, rebuilt out SSL cert, which normally goes well without a hiccup.
However, for today, for some reason which I cannot explain, there was a PHP error... (0 Replies)
Discussion started by: Neo
0 Replies
SPAWN(8) System Manager's Manual SPAWN(8)
NAME
spawn - Postfix external command spawner
SYNOPSIS
spawn [generic Postfix daemon options] command_attributes...
DESCRIPTION
The spawn daemon provides the Postfix equivalent of inetd. It listens on a port as specified in the Postfix master.cf file and spawns an
external command whenever a connection is established. The connection can be made over local IPC (such as UNIX-domain sockets) or over
non-local IPC (such as TCP sockets). The command's standard input, output and error streams are connected directly to the communication
endpoint.
This daemon expects to be run from the master(8) process manager.
COMMAND ATTRIBUTE SYNTAX
The external command attributes are given in the master.cf file at the end of a service definition. The syntax is as follows:
user=username (required)
user=username:groupname
The external command is executed with the rights of the specified username. The software refuses to execute commands with root
privileges, or with the privileges of the mail system owner. If groupname is specified, the corresponding group ID is used instead
of the group ID of of username.
argv=command... (required)
The command to be executed. This must be specified as the last command attribute. The command is executed directly, i.e. without
interpretation of shell meta characters by a shell command interpreter.
BUGS
In order to enforce standard Postfix process resource controls, the spawn daemon runs only one external command at a time. As such, it
presents a noticeable overhead by wasting precious process resources. The spawn daemon is expected to be replaced by a more structural
solution.
DIAGNOSTICS
The spawn daemon reports abnormal child exits. Problems are logged to syslogd(8).
SECURITY
This program needs root privilege in order to execute external commands as the specified user. It is therefore security sensitive. However
the spawn daemon does not talk to the external command and thus is not vulnerable to data-driven attacks.
CONFIGURATION PARAMETERS
The following main.cf parameters are especially relevant to this program. See the Postfix main.cf file for syntax details and for default
values. Use the postfix reload command after a configuration change.
Miscellaneous
export_environment
List of names of environment parameters that can be exported to non-Postfix processes.
mail_owner
The process privileges used while not running an external command.
Resource control
service_command_time_limit
The amount of time the command is allowed to run before it is killed with force. The service name is the name of the entry in the
master.cf file. The default time limit is given by the global command_time_limit configuration parameter.
SEE ALSO
master(8) process manager
syslogd(8) system logging
LICENSE
The Secure Mailer license must be distributed with this software.
AUTHOR(S)
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
SPAWN(8)