script:
Looks like the script hangs when stdin is empty or contains space. Any ideas on how to circumvent this? is it possible to use getline to process stdin content?
Hi,
I have script which is based on TCL and expect. It is written to test my code. It usually runs fine for a while and hangs after sometime.
Code snippet
set l_temp_timeout $timeout
OUTPUT_LOG2 2 >>>$expect_out(buffer)<<<
OUTPUT_LOG2 2... (2 Replies)
I am unable to use STDIn redirection with < (commands)
When I do the following, both approaches work and give the same results:
1.
$ printf "aaa\nbbb\n" > file1
$ printf "111\n222\n" > file2
$ cat file1 file2
aaa
bbb
111
2222.
$ cat <(printf "aaa\nbbb\n") <(printf "111\n222\n")
aaa... (8 Replies)
Hello,
I've managed to get my .procmailrc file to work. At least it triggers a script which creates a file. But the file is empty. How do I get at the data that's been piped? I've done much creative googling to no avail. I belive it should be in stdin, but I can't figure out how to access... (4 Replies)
Running on AIX 5.3L.
I have a program "foo" written in Fortran that requires 3 levels of inputs from stdin (command prompt).
> foo
Enter Input 1: a
Enter Input 2: b
Enter Input 3: c
running foo
success!
>
How do I get a shell script to run this automatically?
> echo "a" | foo... (2 Replies)
Hi ,
I have script in that , i uninstall rpm using rpm -ef $rc1
now my query is rpm -ef is asking user input DO YOU Want To continue (YES/NO) for each uninstalltion.
now i want to supply YES variable when it asks for above statement .
so that i dont have to give user input from... (4 Replies)
I'm trying to automatically pass user input values into a script that is being called from another script, below is my current script and I added a comment next to the script where it asks user to enter input value.
Thanks,
mbak
#!/bin/ksh
echo " Adding disks for DB server then Enter YES... (2 Replies)
Say I had an extremely simple script called testScript.sh:
#!/bin/sh
echo $1
and I invoked it as:
source testScript.sh <<< x
or
source testScript.sh <<< inputFile.txt
When I do the above the values don't appear in the echo statement, and I know that is because in the echo... (5 Replies)
I have a script that looks like this:sed -f myfile.sed $1 > $1.out called myscript and would like to change it so the parameter isn't necessary: ls *.idx | myscript | xargs some_command What do I need to add so it can run either way?
TIA
---------- Post updated at 09:41 AM ----------... (1 Reply)
I have put a script inside bash_profile of user "root". That script executes when we do "sudo su -" and prompts with a question : "Why are you logginf as root?" and users have to pass the reason then they get prompt. Inside script we have used "read -p input" to take input from user.
I am a... (3 Replies)
Discussion started by: shekhar_4_u
3 Replies
LEARN ABOUT DEBIAN
gnupg::handles
GnuPG::Handles(3pm) User Contributed Perl Documentation GnuPG::Handles(3pm)NAME
GnuPG::Handles - GnuPG handles bundle
SYNOPSIS
use IO::Handle;
my ( $stdin, $stdout, $stderr,
$status_fh, $logger_fh, $passphrase_fh,
)
= ( IO::Handle->new(), IO::Handle->new(), IO::Handle->new(),
IO::Handle->new(), IO::Handle->new(), IO::Handle->new(),
);
my $handles = GnuPG::Handles->new
( stdin => $stdin,
stdout => $stdout,
stderr => $stderr,
status => $status_fh,
logger => $logger_fh,
passphrase => $passphrase_fh,
);
DESCRIPTION
GnuPG::Handles objects are generally instantiated to be used in conjunction with methods of objects of the class GnuPG::Interface.
GnuPG::Handles objects represent a collection of handles that are used to communicate with GnuPG.
OBJECT METHODS
Initialization Methods
new( %initialization_args )
This methods creates a new object. The optional arguments are initialization of data members.
hash_init( %args ).
OBJECT DATA MEMBERS
stdin
This handle is connected to the standard input of a GnuPG process.
stdout
This handle is connected to the standard output of a GnuPG process.
stderr
This handle is connected to the standard error of a GnuPG process.
status
This handle is connected to the status output handle of a GnuPG process.
logger
This handle is connected to the logger output handle of a GnuPG process.
passphrase
This handle is connected to the passphrase input handle of a GnuPG process.
command
This handle is connected to the command input handle of a GnuPG process.
options
This is a hash of hashrefs of settings pertaining to the handles in this object. The outer-level hash is keyed by the names of the
handle the setting is for, while the inner is keyed by the setting being referenced. For example, to set the setting "direct" to true
for the filehandle "stdin", the following code will do:
# assuming $handles is an already-created
# GnuPG::Handles object, this sets all
# options for the filehandle stdin in one blow,
# clearing out all others
$handles->options( 'stdin', { direct => 1 } );
# this is useful to just make one change
# to the set of options for a handle
$handles->options( 'stdin' )->{direct} = 1;
# and to get the setting...
$setting = $handles->options( 'stdin' )->{direct};
# and to clear the settings for stdin
$handles->options( 'stdin', {} );
The currently-used settings are as follows:
direct
If the setting "direct" is true for a handle, the GnuPG process spawned will access the handle directly. This is useful for having
the GnuPG process read or write directly to or from an already-opened file.
SEE ALSO
GnuPG::Interface,
perl v5.12.4 2009-04-21 GnuPG::Handles(3pm)