08-25-2012
What are you trying to do?
Why do you need to?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a webpage that is in HTML and PHP. In PHP I have tried using exec, system, shell_exec and passthru functions to call an Expect Script file (temp.exp). This Expect file spawns a telnet session that uses "expect/send" commands to retrieve information from an environmental unit (not a normal... (0 Replies)
Discussion started by: CCUSmith
0 Replies
2. Shell Programming and Scripting
I call a EXPECT script from my perl script with machine IP and a FIle. The script logins to the machine and exports the value. The values to be exported or stored in a file.
I have close to 10 machines and I have created 10 files and pass the corresponding files in command line, Now I could like... (4 Replies)
Discussion started by: ramkriz
4 Replies
3. Shell Programming and Scripting
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
Hi,
Please share you experience and way out on below error:-->
#!/bin/bash -xv
FILE=login.txt
+ FILE=login.txt
CONNECT=sshlogin.exp
+ CONNECT=sshlogin.exp
SERVERNAME=$1
+ SERVERNAME=192.168.12.1
MyServer=""
+ MyServer=
MyUser=""
+ MyUser=
MyPassword=""
+ MyPassword=
exec 3<&0
+... (6 Replies)
Discussion started by: manish_1678
6 Replies
5. Shell Programming and Scripting
Hi there,
I need some help regarding the execution of shell script from expect as the method I am trying is giving me error. I wrote an shell program which takes two arguments to telnet to a device and saves the output in a file. Following is the script.... (0 Replies)
Discussion started by: cyberparanoid
0 Replies
6. Shell Programming and Scripting
Hi All,
I have an Expect script which logs into Cisco switch, performs a show interface command. I want to read a file of ip addresses which will be passed to the expect script.
The script to read the file works, the expect script works on it's own but when i call the 'expect' script from the... (12 Replies)
Discussion started by: trinak96
12 Replies
7. Shell Programming and Scripting
Hi all,
This is the first time i am using expect.
I am trying to call a function with in the shell script. The function will shh to a new server and will pass the password using expect and send. I need help in calling the fuction i am getting follaowing errors...
here the script
... (8 Replies)
Discussion started by: firestar
8 Replies
8. Programming
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies
9. Shell Programming and Scripting
password check in bash script calling on expect
Background: I have to copy a file from one server, to over 100 servers in a test environment. once the file is copied, it requires to have the permissions on the file changed/verified. These are all linux servers. most of them have the same... (1 Reply)
Discussion started by: 2legit2quit
1 Replies
10. UNIX for Advanced & Expert Users
Hi Team,
I have to execute a task from my local machine, where i keep my .expect,.sh, .bash and .python scripts .Task are coded in the script and has to be executed at remote machine.
for that i used following task
.....
SCRIPT 1:
cat shell_check.sh
read value
if
then
expect... (3 Replies)
Discussion started by: Sivarajan N
3 Replies
LEARN ABOUT HPUX
posix_fadvise64
posix_fadvise(2) System Calls Manual posix_fadvise(2)
NAME
posix_fadvise(), posix_fadvise64() - file advisory information
SYNOPSIS
Parameters
fd The open file descriptor to which the fadvise operation applies.
offset The begining of the specified range as a positive, byte offset.
len The length of the specified range in bytes.
advice Specifies advice to be applied to range.
DESCRIPTION
The function is used to advise the system about the expected behavior of the application with respect to the data in the file associated
with the open file descriptor, fd, starting at offset and continuing for len bytes. The specified range need not currently exist in the
file. If len is zero, all data following offset is specified.
It should be noted that the effect of all hints is cumulative for a given file object. All hints will be removed on processing the last
close of the file object.
The function may be used for large file access by a 32-bit application built with set to 64.
The advice parameter is used to convey the hint to be applied to the data and may be one of the following values:
Specifies that the application has no advice to give on its behavior with respect to the specified data. It is the default characteristic
if no advice is given for an open file.
Specifies that the application expects to access the specified range of data
sequentially from the lower offsets to higher offsets.
Specifies that the application will expect to access the specified
specified range of data in a random order.
Specifies that the application will expect to access the specified
range of data in the near future.
Specifies that the application will expect that it will not
access the specified range of data in the near future.
Specifies that the application will expect to access the specified range
of data once and then not reuse it thereafter.
These values will be defined in
RETURN VALUE
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If the service fails, is set to one of the following values:
The fd argument is not a valid file descriptor.
The fd argument is associated with a pipe or FIFO.
The posix_fadvise operation is not supported by the underlying file system.
The value of advice or one of the other input values has been found to be invalid.
A designated hint is not supported by the underlying file object.
EXAMPLES
AUTHOR
was derived by HP from the IEEE POSIX 1003.1-2001 Standard.
SEE ALSO
fadvise(2), fcntl(2), fadvise(5), fcntl(5).
STANDARDS CONFORMANCE
posix_fadvise(2)