01-16-2013
This scheme seems a bit messy, since it lets you splatter commandline argument parsing wherever you feel like, instead of keeping it central in main(). And it's not really more organized than the scheme you had before, which was just a big list of variables.
What is a vect2? A 2d vector, but of what, ints, floats, doubles?
Last edited by Corona688; 01-16-2013 at 12:06 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies
2. Shell Programming and Scripting
Hi All,
Can we pass arguments while calling the perl script and as well as ask user input during execution of the script?
My program is as below:
I am passing arg1 and arg2 as argements to test.pl
]./test.pl arg1 arg2
Inside the test.pl I have :
print "Do you want a name ? (y/n) : ";... (2 Replies)
Discussion started by: jisha
2 Replies
3. Shell Programming and Scripting
Hello,
is it possible to give grep two documents to surche for? like
grep "test" /home/one.txt AND /home/two.txt ?
thanks (1 Reply)
Discussion started by: Cybertron
1 Replies
4. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
5. Shell Programming and Scripting
HI
i have written a script to ask input from the user.
this script should promote the user for y/n input. if user enters anyother input then y/n
the script promotes him again. this below code is working fine for all the cases.
except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies
6. Shell Programming and Scripting
Hi,
I need to get input arguments, as well as validate them. This is how I'm reading them:
#!/bin/bash
args="$@" # save arguments to variable
## Read input arguments, if so
while ; do
case $1 in
-v | --verbose ) verbose=true;;
-z | --gzip ) compression="gz";;
... (3 Replies)
Discussion started by: AlbertGM
3 Replies
7. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
8. Homework & Coursework Questions
Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints.
1. The problem statement, all variables and given/known data:
How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 Replies
9. Shell Programming and Scripting
Hi,
I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
10. Shell Programming and Scripting
This script is running some exe file we are passing three argumnet below custome key word
Want to update script based on input files every time it will take argument from input file
below is the input files should take this input put it into the script.
k.ksh
cd /u/kali/temp
... (8 Replies)
Discussion started by: Kalia
8 Replies
LEARN ABOUT DEBIAN
gnupg::options
GnuPG::Options(3pm) User Contributed Perl Documentation GnuPG::Options(3pm)
NAME
GnuPG::Options - GnuPG options embodiment
SYNOPSIS
# assuming $gnupg is a GnuPG::Interface object
$gnupg->options->armor( 1 );
$gnupg->options->push_recipients( 'ftobin', '0xABCD1234' );
DESCRIPTION
GnuPG::Options objects are generally not instantiated on their own, but rather as part of a GnuPG::Interface object.
OBJECT METHODS
new( %initialization_args )
This methods creates a new object. The optional arguments are initialization of data members.
hash_init( %args ).
copy
Returns a copy of this object. Useful for 'saving' options.
get_args
Returns a list of arguments to be passed to GnuPG based on data members which are 'meta_' options, regular options, and then
extra_args, in that order.
OBJECT DATA MEMBERS
homedir
armor
textmode
default_key
no_greeting
verbose
no_verbose
quiet
batch
always_trust
comment
status_fd
logger_fd
passphrase_fd
compress_algo
force_v3_sigs
rfc1991
openpgp
options
no_options
encrypt_to
recipients
These options correlate directly to many GnuPG options. For those that are boolean to GnuPG, simply that argument is passed. For those
that are associated with a scalar, that scalar is passed passed as an argument appropriate. For those that can be specified more than
once, such as recipients, those are considered lists and passed accordingly. Each are undefined or false to begin.
Meta Options
Meta options are those which do not correlate directly to any option in GnuPG, but rather are generally a bundle of options used to
accomplish a specific goal, such as obtaining compatibility with PGP 5. The actual arguments each of these reflects may change with time.
Each defaults to false unless otherwise specified.
These options are being designed and to provide a non-GnuPG-specific abstraction, to help create compatibility with a possible
PGP::Interface module.
To help avoid confusion, methods with take a form of a key as an object shall be prepended with _id(s) if they only take an id; otherwise
assume an object of type GnuPG::Key is required.
meta_pgp_5_compatible
If true, arguments are generated to try to be compatible with PGP 5.x.
meta_pgp_2_compatible
If true, arguments are generated to try to be compatible with PGP 2.x.
meta_interactive
If false, arguments are generated to try to help the using program use GnuPG in a non-interactive environment, such as CGI scripts.
Default is true.
meta_signing_key_id
This scalar reflects the key used to sign messages. Currently this is synonymous with default-key.
meta_signing_key
This GnuPG::Key object reflects the key used to sign messages.
meta_recipients_key_ids
This list of scalar key ids are used to generate the appropriate arguments having these keys as recipients.
meta_recipients_keys
This list of keys of the type GnuPG::Key are used to generate the appropriate arguments having these keys as recipients. You probably
want to have this list be of the inherited class GnuPG::SubKey, as in most instances, OpenPGP keypairs have the encyrption key as the
subkey of the primary key, which is used for signing.
Other Data Members
extra_args
This is a list of any other arguments used to pass to GnuPG. Useful to pass an argument not yet covered in this package.
SEE ALSO
GnuPG::Interface,
perl v5.12.4 2010-05-10 GnuPG::Options(3pm)