Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Setting config database user and password using sed Post 303035091 by dco on Tuesday 14th of May 2019 01:49:15 PM
Old 05-14-2019
Dear stomp,
Thank you very much for your help, it's works very well !!!
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

I can't fire up MySql on my Fedora Server - Obvious config setting?

Hiya All, I can't fire up MySql on my FC-3 Server at work. I get the Error message at the end of this post. Looks like some Config problem on the Server itself. (Ie web server and MYSQL is all on the same box. I get the same errror when trying to fire up MYSQL at the Box, as well as... (2 Replies)
Discussion started by: marty 600
2 Replies

2. UNIX for Advanced & Expert Users

UX Kernel setting while database installation

Hi All I am kinda wondering about the UX kernel parameters, how we configure and why do we configure ???.. especially the 'semaphores'. Could somebody throw some light on this and would really appreciate it. (1 Reply)
Discussion started by: Prince_Charming
1 Replies

3. UNIX for Advanced & Expert Users

setting password for user using useradd?

hi all i am writing a script to create user and group from the input given to script for eg. script needs to values 1. mode - 1 or 2 2. id - if mode is 1 then id should be 2 char like x1 / v1 / v2 if mode is 2 then id should be 1 char like x / v / e from these to values group is... (1 Reply)
Discussion started by: zedex
1 Replies

4. Solaris

Password Setting

Hi: Could I set the: - Login Time-out Interval - Password History Count - Lockout Duration - Lockout Threshold for user account in Sun Solaris 5.8. Thanks for your help (6 Replies)
Discussion started by: mlsun
6 Replies

5. UNIX for Dummies Questions & Answers

Firefox: Setting about:config options upon install

Is there a way to set the about:config options for Firefox automatically as part of the installation of Firefox? (3 Replies)
Discussion started by: figaro
3 Replies

6. UNIX for Advanced & Expert Users

Can we Automate the User creation and setting password through a script in solaris 10

Hi, I am using Solaris 10 OS and Bash shell.Is there any way can we automate User creation and setting passwords through a script or any freeware tool. Advance thanks for your response. (1 Reply)
Discussion started by: muraliinfy04
1 Replies

7. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

8. Shell Programming and Scripting

Setting up postgreSql database

Hi I have a small bash script which I want to run on an Amazon EC2 Ubuntu instance for setting up a postgreSQL database: #!/bin/bash USERNAME='postgres' start=$SECONDS TMP_DIR=/local/test/4g4d PORT=23456 rm -rf $TMP_DIR/db mkdir -p $TMP_DIR/ echo "creating database..."... (3 Replies)
Discussion started by: Helveticus
3 Replies

9. Shell Programming and Scripting

DB Password encryption in config file

Hi Gurus, I need to encrypt the Db passwords which are stored in a configuration file (.txt) as below: stage_db_pwd=ABC this is test line content_db_pwd=123def This is test line 2 stg_db_name=xyz I want to encrypt all the password fields (identified by "pwd"), encrypt them in the same... (3 Replies)
Discussion started by: ashishpanchal85
3 Replies
Data::Section(3pm)					User Contributed Perl Documentation					Data::Section(3pm)

NAME
Data::Section - read multiple hunks of data out of your DATA section VERSION
version 0.101621 SYNOPSIS
package Letter::Resignation; use Data::Section -setup; sub quit { my ($class, $angry, %arg) = @_; my $template = $self->section_data( ($angry ? "angry_" : "professional_") . "letter" ); return fill_in($$template, \%arg); } __DATA__ __[ angry_letter ]__ Dear jerks, I quit! -- {{ $name }} __[ professional_letter ]__ Dear {{ $boss }}, I quit, jerks! -- {{ $name }} DESCRIPTION
Data::Section provides an easy way to access multiple named chunks of line-oriented data in your module's DATA section. It was written to allow modules to store their own templates, but probably has other uses. WARNING
You will need to use "__DATA__" sections and not "__END__" sections. Yes, it matters. Who knew! EXPORTS
To get the methods exported by Data::Section, you must import like this: use Data::Section -setup; Optional arguments may be given to Data::Section like this: use Data::Section -setup => { ... }; Valid arguments are: inherit - if true, allow packages to inherit the data of the packages from which they inherit; default: true header_re - if given, changes the regex used to find section headers in the data section; it should leave the section name in $1 default_name - if given, allows the first section to has no header and set its name Three methods are exported by Data::Section: section_data my $string_ref = $pkg->section_data($name); This method returns a reference to a string containing the data from the name section, either in the invocant's "DATA" section or in that of one of its ancestors. (The ancestor must also derive from the class that imported Data::Section.) By default, named sections are delimited by lines that look like this: __[ name ]__ You can use as many underscores as you want, and the space around the name is optional. This pattern can be configured with the "header_re" option (see above). If present, a single leading "" is removed, so that sections can encode lines that look like section delimiters. When a line containing only "__END__" is reached, all processing of sections ends. section_data_names my @names = $pkg->section_data_names; This returns a list of all the names that will be recognized by the "section_data" method. merged_section_data my $data = $pkg->merged_section_data; This method returns a hashref containing all the data extracted from the package data for all the classes from which the invocant inherits -- as long as those classes also inherit from the package into which Data::Section was imported. In other words, given this inheritance tree: A B C / D ...if Data::Section was imported by A, then when D's "merged_section_data" is invoked, C's data section will not be considered. (This prevents the read position of C's data handle from being altered unexpectedly.) The keys in the returned hashref are the section names, and the values are references to the strings extracted from the data sections. merged_section_data_names my @names = $pkg->merged_section_data_names; This returns a list of all the names that will be recognized by the "merged_section_data" method. local_section_data my $data = $pkg->local_section_data; This method returns a hashref containing all the data extracted from the package on which the method was invoked. If called on an object, it will operate on the package into which the object was blessed. This method needs to be used carefull, because it's weird. It returns only the data for the package on which it was invoked. If the package on which it was invoked has no data sections, it returns an empty hashref. local_section_data_names my @names = $pkg->local_section_data_names; This returns a list of all the names that will be recognized by the "local_section_data" method. TIPS AND TRICKS
MooseX::Declare and namespace::autoclean The namespace::autoclean library automatically cleans foreign routines from a class, including those imported by Data::Section. MooseX::Declare does the same thing, and can also cause your "__DATA__" section to appear outside your class's package. These are easy to address. The Sub::Exporter::ForMethods library provides an installer that will cause installed methods to appear to come from the class and avoid autocleaning. Using an explicit "package" statement will keep the data section in the correct package. package Foo; use MooseX::Declare; class Foo { # Utility to tell Sub::Exporter modules to export methods. use Sub::Exporter::ForMethods qw( method_installer ); # method_installer returns a sub. use Data::Section { installer => method_installer }, -setup; method my_method { my $content_ref = $self->section_data('SectionA'); print $$content_ref; } } __DATA__ __[ SectionA ]__ Hello, world. SEE ALSO
Inline::Files does something that is at first look similar, but it works with source filters, and contains the warning: It is possible that this module may overwrite the source code in files that use it. To protect yourself against this possibility, you are strongly advised to use the -backup option described in "Safety first". Enough said. AUTHOR
Ricardo SIGNES <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.3 2011-04-29 Data::Section(3pm)
All times are GMT -4. The time now is 05:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy