Sponsored Content
Full Discussion: Creating a simple ID Script
Top Forums UNIX for Beginners Questions & Answers Creating a simple ID Script Post 302984238 by kkishore4580 on Saturday 22nd of October 2016 11:46:06 PM
Old 10-23-2016
Linux Creating a simple ID Script

Hello everybody,

SmilieI am new to Linux and I want to create a simple script on Ubuntu that will allow to make database with a few perimeters.

create file and name it Database and complete it with any information
Code:
id     firstname     lastname     phone
 0
 1
 2
 3
 4

Smiliecommand to extract Id and insert it in new file "file1"
Smiliecommand to extract lastname and insert it in new file "file2"
Smiliecommand to extract phone and insert it in new file "file3"

Smiliecommand to combine "file1", "file2" and "file3" in a new file and name it "file4"




Any suggestions will be kindly helpful.Smilie

Last edited by rbatte1; 10-26-2016 at 09:13 AM.. Reason: Added CODE tags
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating a command history feature in a simple UNIX shell using C

I'm trying to write a history feature to a very simple UNIX shell that will list the last 10 commands used when control-c is pressed. A user can then run a previous command by typing r x, where x is the first letter of the command. I'm having quite a bit of trouble figuring out what I need to do, I... (2 Replies)
Discussion started by: -=Cn=-
2 Replies

2. Shell Programming and Scripting

creating a simple archiving script

Im trying to create a script to archive specified directories into a specified tarball backup file. This is what i want the input to look like ex. save -i '/bin/b*' -i '/bin/ls' -o backup this is what i have #!/bin/bash #save - backup file script unset myInput unset myOutput while... (3 Replies)
Discussion started by: lensmen
3 Replies

3. Shell Programming and Scripting

Creating simple shell program

Hi, I'm new to UNIX shell programming... can anyone help in doing the following : 1) create a text file named "Model File" having following columns : Name Number Physics Chemistry 2) prompt user to n rows enter the name, number, physics ,chemistry 3) display the entire columns and rows... (1 Reply)
Discussion started by: Mayuri P R
1 Replies

4. Programming

Creating a simple Help Desk system in PHP

hi guys i'm new to php,,i'm asked to develop a simple online help desk (where the admin can view the problem an forward it to another one to handle it and so on) or get a ready sytem then modify alil on it but i dont know where to start ir to find any suggestion please? (2 Replies)
Discussion started by: kedah160
2 Replies

5. UNIX for Dummies Questions & Answers

Help with creating a simple program!!

i am new to shell scripting!! i am making this program in bourne shell, that asks the user to input "Hello (their name)" or "question (their name)", any other input, "ERROR" will be outputted. if they input "Hello (name)", i want to out saying Hello (name) but if they input "question (name)", i... (4 Replies)
Discussion started by: bshell_1214
4 Replies

6. Shell Programming and Scripting

how to execute ksh simple shell script without creating .sh file

please help me to execute a simple shell script like for i in `ls echo $i done . i dont want to create a new sh file to execute it. Can i just type and execute it ? because I always this kind of simple for loops . Please help . Thanks (7 Replies)
Discussion started by: Sooraj_Linux
7 Replies

7. Homework & Coursework Questions

Help with creating a simple shell script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a shell script that accepts two arguments. The two arguments are the name of 2 files. • If the arguments... (3 Replies)
Discussion started by: Scripter12345
3 Replies

8. Web Development

Creating a Simple Linux Dashboard with Oracle Jet

Creating a Simple Linux Dashboard with Oracle Jet - Part 1 the Server Side PHP Code Creating a simple Linux dashboard with Oracle Jet is easy and fun. It's simple to create a dashboard to monitor your Linux server using Oracle JET. The sky is the limit with indicators and gauges. ... (7 Replies)
Discussion started by: Neo
7 Replies
Test::Database::Driver(3pm)				User Contributed Perl Documentation			       Test::Database::Driver(3pm)

NAME
Test::Database::Driver - Base class for Test::Database drivers SYNOPSIS
package Test::Database::Driver::MyDatabase; use strict; use warnings; use Test::Database::Driver; our @ISA = qw( Test::Database::Driver ); sub _version { my ($class) = @_; ...; return $version; } sub create_database { my ( $self ) = @_; ...; return $handle; } sub drop_database { my ( $self, $name ) = @_; ...; } sub databases { my ($self) = @_; ...; return @databases; } DESCRIPTION
"Test::Database::Driver" is a base class for creating "Test::Database" drivers. METHODS
The class provides the following methods: new( %args ) Create a new "Test::Database::Driver" object. If called as "Test::Database::Driver->new()", requires a "driver" parameter to define the actual object class. make_handle() Create a new "Test::Database::Handle" object, attached to an existing database or to a newly created one. The decision whether to create a new database or not is made by "Test::Database::Driver" based on the information in the mapper. See "TEMPORARY STORAGE ORGANIZATION" for details. make_dsn( %args ) Return a Data Source Name based on the driver's DSN, with the key/value pairs contained in %args as additional parameters. This is typically used by "dsn()" to make a DSN for a specific database, based on the driver's DSN. name() dbd() The driver's short name (everything after "Test::Database::Driver::"). base_dir() The directory where the driver should store all the files for its databases, if needed. Typically used by file-based database drivers. version() "version" object representing the version of the underlying database enginge. This object is build with the return value of "_version()". version_string() Version string representing the version of the underlying database enginge. This string is the actual return value of "_version()". dbd_version() The version of the DBD used to connect to the database engine, as returned by "VERSION()". driver_dsn() Return a driver Data Source Name, sufficient to connect to the database engine without specifying an actual database. username() Return the connection username. password() Return the connection password. connection_info() Return the connection information triplet ("driver_dsn", "username", "password"). version_matches( $request ) Return a boolean indicating if the driver's version matches the version constraints in the given request (see Test::Database documentation's section about requests). The class also provides a few helpful commands that may be useful for driver authors: available_dbname() Return an unused database name that can be used to create a new database for the driver. dsn( $dbname ) Build a Data Source Name for the database with the given $dbname, based on the driver's DSN. WRITING A DRIVER FOR YOUR DATABASE OF CHOICE
The SYNOPSIS contains a good template for writing a "Test::Database::Driver" class. Creating a driver requires writing the following methods: _version() Return the version of the underlying database engine. create_database( $name ) Create the database for the corresponding DBD driver. Return a "Test::Database::Handle" in case of success, and nothing in case of failure to create the database. drop_database( $name ) Drop the database named $name. Some methods have defaults implementations in "Test::Database::Driver", but those can be overridden in the derived class: is_filebased() Return a boolean value indicating if the database engine is file-based or not, i.e. if all the database information is stored in a file or a directory, and no external database server is needed. databases() Return the names of all existing databases for this driver as a list (the default implementation is only valid for file-based drivers). TEMPORARY STORAGE ORGANIZATION
Subclasses of "Test::Database::Driver" store useful information in the system's temporary directory, under a directory named Test-Database-$user ($user being the current user's name). That directory contains the following files: database files The database files and directories created by file-based drivers controlled by "Test::Database" are stored here, under names matching tdd_DRIVER_N, where DRIVER is the lowercased name of the driver and N is a number. the mapping.yml file A YAML file containing a "cwd()" / database name mapping, to enable a given test suite to receive the same database handles in all the test scripts that call the "Test::Database-"handles()> method. AUTHOR
Philippe Bruhat (BooK), "<book@cpan.org>" COPYRIGHT
Copyright 2008-2010 Philippe Bruhat (BooK), all rights reserved. LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-11-27 Test::Database::Driver(3pm)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy