05-15-2013
is it possible to use expect command without the spawn command.? if it is possible then how?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to write an sftp script, but I can't put ssh keys on my destination. Is it possible to pass sftp a password inside a script? I know that the -b option makes sftp use a file for params. Can the password go in such a file? How can I do this? Thanks in advance (3 Replies)
Discussion started by: kskywr
3 Replies
2. Shell Programming and Scripting
Shell script to find the run time based on log entries?
Below is the log files content updated when the script test.sh runs. I would like to calculte the difference between first update time stamp and last update time stamp to find the run time of the script. The below log file shows the first... (1 Reply)
Discussion started by: mailtopranesh
1 Replies
3. Shell Programming and Scripting
Hi all,
I am a newbie.....am jus trying to connect to oracle thro a script, but not thro giving the username/password@server_name directly like
`$ORACLE_HOME/bin/sqlplus username/password@server_name
In the above line, once it is connected to Oracle, it shud ask me the username and password... (4 Replies)
Discussion started by: kritibalu
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am not able to give the password in Unix script for SFTP connection.
When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script.
sftp -v user@xyz.com.
... (4 Replies)
Discussion started by: Vineeta Nigam
4 Replies
5. Shell Programming and Scripting
Hi Expert,
I have a .sh script in my home/new_dir/script.sh
This script creates number of output files at home/new_dir/email, home/new_dir/logs dir.
I am running this script using crontab (owner root).
Now this output files are getting created with
rw-r----- 1 root root
So if i... (2 Replies)
Discussion started by: Jeet1982
2 Replies
6. Shell Programming and Scripting
Hi
I'm copying around 20 vi files from solaris server-A to server-B using 'scp' command.I have included all 20 scp commands in one shell script. Proplem is, while executing each scp command its prompting for my NIS password of server A. Please see below
How to get rid of password prompt.??? (1 Reply)
Discussion started by: buzzme
1 Replies
7. Shell Programming and Scripting
Hi,
Can anyone tell me how to pass password in a shell script for sftp so that i can run it in background without user entering the password?
I used a expect script but it timesout after some time and the process remains incomplete at the end.
Can anyone suggest any other idea?
Will the... (3 Replies)
Discussion started by: Little
3 Replies
8. Shell Programming and Scripting
We have 15 servers. Hostnames for these 15 servers are stored in a text files and loop through each server to connect to the remote server and run a command, but this loop process runs the command one after another. However, the requirement is to run the same command on all 15 servers at the same... (10 Replies)
Discussion started by: laknar
10 Replies
9. Shell Programming and Scripting
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
Would like to write a Script which will run between 11am to 3 pm and send the results to output.txt.
Please suggest. (2 Replies)
Discussion started by: vasuvv
2 Replies
LEARN ABOUT NETBSD
posix_spawnattr_init
POSIX_SPAWNATTR_INIT(3) BSD Library Functions Manual POSIX_SPAWNATTR_INIT(3)
NAME
posix_spawnattr_init, posix_spawnattr_destroy -- initialize and destroy spawn attributes object
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <spawn.h>
int
posix_spawnattr_init(posix_spawnattr_t * attr);
int
posix_spawnattr_destroy(posix_spawnattr_t * attr);
DESCRIPTION
The posix_spawnattr_init() function initializes a spawn attributes object attr with the default value for all of the individual attributes
used by the implementation. Initializing an already initialized spawn attributes object may cause memory to be leaked.
The posix_spawnattr_destroy() function destroys a spawn attributes object. A destroyed attr attributes object can be reinitialized using
posix_spawnattr_init(). The object should not be used after it has been destroyed.
A spawn attributes object is of type posix_spawnattr_t (defined in <spawn.h>) and is used to specify the inheritance of process attributes
across a spawn operation.
The resulting spawn attributes object (possibly modified by setting individual attribute values), is used to modify the behavior of
posix_spawn() or posix_spawnp(). After a spawn attributes object has been used to spawn a process by a call to a posix_spawn() or
posix_spawnp(), any function affecting the attributes object (including destruction) will not affect any process that has been spawned in
this way.
RETURN VALUES
Upon successful completion, posix_spawnattr_init() and posix_spawnattr_destroy() return zero; otherwise, an error number is returned to indi-
cate the error.
ERRORS
The posix_spawnattr_init() function will fail if:
[ENOMEM] Insufficient memory exists to initialize the spawn file actions object.
SEE ALSO
posix_spawn(3), posix_spawnp(3)
STANDARDS
The posix_spawnattr_init() and posix_spawnattr_destroy() functions conform to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
The posix_spawnattr_init() and posix_spawnattr_destroy() functions first appeared in FreeBSD 8.0 and imported for NetBSD 6.
AUTHORS
Ed Schouten <ed@FreeBSD.org>
BSD
December 20, 2011 BSD