Sponsored Content
Top Forums Shell Programming and Scripting Passing argument from one script to other Post 56583 by lloydnwo on Wednesday 6th of October 2004 02:54:09 AM
Old 10-06-2004
Passing argument from one script to other

Dear All,

I have one script which accepts database name and user_id from the user, i have another script that will unload the data from all the tables based on the user_id accepted by the user. How can i pass the user_id from the 1st script to the other. My OS is sun solaris. Thanks in advance.

Regards,

lloyd
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Passing argument to awk script

I am writing a shell script. Now i need to read in a string and send it to an awk file to compare and search for compatible record. I wrote it like tat: read serial | awk -f generate.awk data.dat p/s: the data file got 6 field. According to an expert, we can write it like tat: read... (1 Reply)
Discussion started by: AkumaTay
1 Replies

2. Shell Programming and Scripting

Problem when passing argument to a shell script

Hi all, I'm new to Shell scripting. In my shell script for Bourne shell, the script accepts a date parameter which is optional. If the value is supplied, the supplied value should be assigned to a variable. If not, the current date will be assigned to the variable. My script is like this. #!... (9 Replies)
Discussion started by: sumesh.abraham
9 Replies

3. Shell Programming and Scripting

Need to run the script by argument passing

Hi All, I have a question regarding running this script by passing an argument, for example ./ShellParse.sh sun, how do i do that? So i want when i pass argument sun, it shouild execute things inside the for loop. I want to support some other platforms too, so there are more for loops to... (3 Replies)
Discussion started by: asirohi
3 Replies

4. Shell Programming and Scripting

Its Urgent ::: Passing Argument during Script Execution

Dear All, Plz, can someone clarify me regarding the below. Actually I want to write the script that will get the some parameter like "yes" or "No" as we wish during execution without prompting for entering that word. Plz tell me... Its Urgent.. Thanks & Regards ... (1 Reply)
Discussion started by: ks47
1 Replies

5. Shell Programming and Scripting

Passing argument to a script while executing it within current shell

Hi Gurus, I have written a script set_env.ksh to which I pass an argument and set the oracle login credentials based on the argument I pass. The script has code as below. ORACLE_SID=$1 DB_SCHEMA_LOGON=$DB_SCHEMA_USER/$DB_SCHEMA_PASSWORD@$ORACLE_SID; export DB_SCHEMA_LOGON; echo... (3 Replies)
Discussion started by: Sabari Nath S
3 Replies

6. Shell Programming and Scripting

Passing value as a command line argument in awk script.

I have one working awk command line. Which taking data from the “J1202523.TXT” file and generating the “brazil.dat” file. PFB code. awk '{ DUNS = substr($0,0,9);if ( substr($0,14,3) == "089" ) print DUNS }' J1202523.TXT > Brazil.dat But now I want to pass two parameter as a command line argument... (4 Replies)
Discussion started by: humaemo
4 Replies

7. Shell Programming and Scripting

Passing --usage as argument to awk script

I have the awk script below and things go wrong when I do awk -v dsrmx=25 -f ./checkSRDry.awk --usage I basically want to override the usual --usage and --help that awk gives. How do people usually handle this situation when you also want to supply your own usage and help concerning the... (2 Replies)
Discussion started by: kristinu
2 Replies

8. Shell Programming and Scripting

Passing argument from Java to Shell script

Hi All, I want to pass array of argument from Java to a shell script.I can use process builder api and its exec() method to call the script,but the question is how to receive the parameter in the script. Thanks in advance ---------- Post updated at 10:00 PM ---------- Previous update was... (1 Reply)
Discussion started by: Abhijeet_Atti
1 Replies

9. Shell Programming and Scripting

passing argument in script?

hi, I want to implement some function to perform following task if ; then $TEXT = "Data_0" else $TEXT = $1 fi if ; then $Lines = 45 else $Lines = $2 fi Kindly suggest, thanks (11 Replies)
Discussion started by: nrjrasaxena
11 Replies

10. Shell Programming and Scripting

Passing variable as an argument to another script

Hi, I am trying to pass a variable as an argument to another script. While substitution of variable, I am facing a problem. varaiable "a" value should be -b "FPT MAIN". When we pass "a" to another script, we are expecing it to get substitue as ./test.sh -b "FPT MAIN". But, it is getting... (9 Replies)
Discussion started by: Manasa Pradeep
9 Replies
Catalyst::Authentication::Realm::SimpleDB(3pm)		User Contributed Perl Documentation	    Catalyst::Authentication::Realm::SimpleDB(3pm)

NAME
Catalyst::Authentication::Realm::SimpleDB - A simplified Catalyst authentication configurator. SYNOPSIS
use Catalyst qw/ Authentication /; __PACKAGE__->config->{'Plugin::Authentication'} = { default => { class => 'SimpleDB', user_model => 'MyApp::Schema::Users', } } # later on ... $c->authenticate({ username => 'myusername', password => 'mypassword' }); my $age = $c->user->get('age'); $c->logout; DESCRIPTION
The Catalyst::Authentication::Realm::SimpleDB provides a simple way to configure Catalyst Authentication when using the most common configuration of a password protected user retrieved from an SQL database. CONFIGURATION
The SimpleDB Realm class configures the Catalyst authentication system based on the following: o Your user data is stored in a table that is accessible via $c->model($cfg->{user_model}); o Your passwords are stored in the 'password' field in your users table and are not encrypted. o Your roles for users are stored in a separate table and are directly accessible via a DBIx::Class relationship called 'roles' and the text of the role is stored in a field called 'role' within the role table. o Your user information is stored in the session once the user is authenticated. For the above usage, only one configuration option is necessary, 'user_model'. user_model should contain the class name of your user class. See the "PREPARATION" section for info on how to set up your database for use with this module. If your system differs from the above, some minor configuration may be necessary. The options available are detailed below. These options match the configuration options used by the underlying credential and store modules. More information on these options can be found in Catalyst::Authentication::Credential::Password and Catalyst::Authentication::Store::DBIx::Class. user_model Contains the class name (as passed to $c->model() ) of the DBIx::Class schema to use as the source for user information. This config item is REQUIRED. password_field If your password field is not 'password' set this option to the name of your password field. Note that if you change this to, say 'users_password' you will need to use that in the authenticate call: $c->authenticate({ username => 'bob', users_password => 'foo' }); password_type If the password is not stored in plaintext you will need to define what format the password is in. The common options are crypted and hashed. Crypted uses the standard unix crypt to encrypt the password. Hashed uses the Digest modules to perform password hashing. password_hash_type If you use a hashed password type - this defines the type of hashing. See Catalyst::Authentication::Credential::Password for more details on this setting. role_column If your users roles are stored directly in your user table, set this to the column name that contains your roles. For example, if your user table contains a field called 'permissions', the value of role_column would be 'permissions'. NOTE: If multiple values are stored in the role column, they should be space or pipe delimited. role_relation and role_field These define an alternate role relationship name and the column that holds the role's name in plain text. See "CONFIGURATION" in Catalyst::Authentication::Store::DBIx::Class for more details on these settings. use_userdata_from_session This is a simple 1 / 0 setting which determines how a user's data is saved / restored from the session. If it is set to 1, the user's complete information (at the time of authentication) is cached between requests. If it is set to 0, the users information is loaded from the database on each request. PREPARATION
This module makes several assumptions about the structure of your database. Below is an example of a table structure which will function with this module in it's default configuration. You can use this table structure as-is or add additional fields as necessary. NOTE that this is the default SimpleDB configuration only. Your table structure can differ significantly from this when using the DBIx::Class Store directly. -- -- note that you can add any additional columns you require to the users table. -- CREATE TABLE users ( id INTEGER PRIMARY KEY, username TEXT, password TEXT, ); CREATE TABLE roles ( id INTEGER PRIMARY KEY, role TEXT ); CREATE TABLE user_roles ( user_id INTEGER, role_id INTEGER, PRIMARY KEY (user_id, role_id) ); Also, after you have loaded this table structure into your DBIx::Class schema, please be sure that you have a many_to_many DBIx::Class relationship defined for the users to roles relation. Your schema files should contain something along these lines: "lib/MyApp/Schema/Users.pm": __PACKAGE__->has_many(map_user_role => 'MyApp::Schema::UserRoles', 'user_id'); __PACKAGE__->many_to_many(roles => 'map_user_role', 'role'); "lib/MyApp/Schema/UserRoles.pm": __PACKAGE__->belongs_to(role => 'MyApp::Schema::Roles', 'role_id'); MIGRATION
If and when your application becomes complex enough that you need more features than SimpleDB gives you access to, you can migrate to a standard Catalyst Authentication configuration fairly easily. SimpleDB simply creates a standard Auth config based on the inputs you give it. The config SimpleDB creates by default looks like this: MyApp->config('Plugin::Authentication') = { default => { credential => { class => 'Password', password_type => 'clear' }, store => { class => 'DBIx::Class', role_relation => 'roles', role_field => 'role', use_userdata_from_session => '1', user_model => $user_model_from_simpledb_config } } }; SEE ALSO
This module relies on a number of other modules to do it's job. For more information you can refer to the following: o Catalyst::Manual::Tutorial::Authentication o Catalyst::Plugin::Authentication o Catalyst::Authentication::Credential::Password o Catalyst::Authentication::Store::DBIx::Class o Catalyst::Plugin::Authorization::Roles perl v5.14.2 2011-08-23 Catalyst::Authentication::Realm::SimpleDB(3pm)
All times are GMT -4. The time now is 10:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy