Sponsored Content
Top Forums Shell Programming and Scripting Reading variable from file variable values Post 302329341 by rakesh_pagadala on Friday 26th of June 2009 05:17:26 PM
Old 06-26-2009
try this...
sed -n '3p' test | awk '{print $1 " " $3}'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading file and assigning that to Variable

I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code : #!/bin/ksh... (2 Replies)
Discussion started by: Vaddadi
2 Replies

2. Shell Programming and Scripting

reading the whole line from a file into a variable

Hi, I am doing : while read line do printf "%s\n" ${line} done <datafile.txt but I am not getting each single line from the data file assigned to the variable line (but only tokens/fields at a time). I also tried while IFS= read -r lineI want the whole line assigned or read into the... (2 Replies)
Discussion started by: shri_nath
2 Replies

3. UNIX for Dummies Questions & Answers

Reading a variable from file

Hi, I have a situation where I need to read a variable from another file. But the problem is that the variable in the other file is starting with $. E.g. file1: $var1=out temp_ss.sh: . file1 echo "Print : $var1" It works fine if the file1 is having var1=out (note that it is... (6 Replies)
Discussion started by: shash
6 Replies

4. Shell Programming and Scripting

reading variable value from a file

Hello, I need to read a variable value from script. Below is the scenario I am reading a value from an external file say a.txt a.txt: Jan Feb Mar I need the corresponding value of the months in in numerics such as Jan -->1, Feb-->2 etc. I have this mapping in another file... (1 Reply)
Discussion started by: aixjadoo
1 Replies

5. Shell Programming and Scripting

Reading a file with while into variable and using in another process

I would appreciate some help, please. I have a file cutshellb.txt, which contains four report names (but it could be any number from 1 to x. The report suffix is not necessarily consecutive: report3785 report3786 report3787 report3788 I have a shell script which attempts to read the... (3 Replies)
Discussion started by: Dicloflex
3 Replies

6. Shell Programming and Scripting

Reading a variable from parameter file

HI all, I have a parameter file with entries like $$Name =Abhinav $$CUTOFF_DATE = 11/11/2209 I am reading a variable from this file using a awk command like : var2=`awk -F"" "/CUTOFF_DATE/{f=$1;}{print f;}" InputFIleName` but facing an error like awk: cmd. line:1:... (3 Replies)
Discussion started by: abhinav192
3 Replies

7. Shell Programming and Scripting

Reading from a file and storing it in a variable

Hi folks, I'm using bash and would like to do the following. I would like to read some values from the file and store it in the variable and use it. My file is 1.txt and its contents are VERSION=5.6 UPDATE=4 I would like to read "5.6" and "4" and store it in a variable in shell... (6 Replies)
Discussion started by: scriptfriend
6 Replies

8. Shell Programming and Scripting

Reading from a File and Using as an Input variable

I need to know how the the string constant from Input File should be read and provide as input data for the script . INPUT FILE CONST VARIABLE myname=/root/dir/syslog/myname1 myname=/root/dir/syslog/myname2 myname=/root/dir/syslog/myname3 urname=/root/dir/syslog/urname1... (6 Replies)
Discussion started by: baraghun
6 Replies

9. Homework & Coursework Questions

Matlab help! Reading in a file with a variable filename

1. The problem statement, all variables and given/known data: I want to read in a file, and plot the data in matlab. However, I do not like hardwiring filenames into my codes, so I always give the user the option to specify what the filename is. I am pretty inexperienced with matlab, so I have no... (0 Replies)
Discussion started by: ds7202
0 Replies

10. Shell Programming and Scripting

Reading properties from file and setting variable values

I want to read properties from a file and print evaluated values of each key. I am using AIX6.1. myfile.props protocol=http siteA.host=siteAhostname pageA=pageNameA siteAURL1=${protocol}:/${siteA.host}/pagea/blabla?v1=32 siteAURL2=${protocol}:/${siteA.host}/${pageA}/blabla?v1=32... (5 Replies)
Discussion started by: kchinnam
5 Replies
imqdbmgr(1M)						  System Administration Commands					      imqdbmgr(1M)

NAME
imqdbmgr - manage a plugged-in JDBC-compliant Message Queue data store SYNOPSIS
/usr/bin/imqdbmgr subcommand argument [ [option...]] /usr/bin/imqdbmgr -h | -help /usr/bin/imqdbmgr -v | -version DESCRIPTION
The imqdbmgr utility creates and manages a Java DataBase Connectivity (JDBC) compliant database used for Message Queue persistent storage. The database can be either embedded or external. To use a JDBC-compliant database (and the imdbmgr utility), you need to first set a number of JDBC-related properties in the broker instance configuration file. See the Sun Java System Message Queue Administrator's Guide for addi- tional information. imqdbmgr supports four management subcommands. These subcommands, and their corresponding arguments and options follow the imqdbmgr command on the command line. See USAGE and OPTIONS. The following subcommands are supported: create Create a Message Queue database schema. delete Delete Message Queue database tables in the current data store. recreate Delete Message Queue database tables and recreate Message Queue database schema in the curent data store. reset Reset the database table lock to allow other processes to access database tables. The imqdbmgr subcommands support the following arguments: all Indicates the subcommand applies to the data store, as well as the database tables. lck Indicates the subcommand applies to the database table lock. oldtbl Indicates the subcommand applies to an older version of the database tables. tbl Indicates the subcommand applies to the database tables only. OPTIONS
The following options are supported: -b brokerName Specify the broker instance name and corresponding instance configuration properties. If this option is not speci- fied, the default broker instance is assumed. Use this option with the create, delete, recreate, or reset subcommands. -D property=value Set system property property to value. Use this option with the create, delete, recreate, or reset subcommands. -h | -help Display usage help. Execute nothing else on the command line. -p password Specify the database password. Use this option with the create, delete, recreate, or reset subcommands. -u userName Specify the database user name. Use this option with the create, delete, recreate, or reset subcommands. -v | -version Display version information. Execute nothing else on the command line. USAGE
The following subcommands and associated arguments are supported: create all Create a new embedded data store and Message Queue database schema for a specified or default broker instance. create tbl [-u userName] [-p password] Create Message Queue database schema in an existing data store for a specified or default broker instance. delete tbl [-u userName] [-p password] Delete Message Queue database tables in the current data store for a specified or default broker instance. delete oldtbl [-u userName] [-p password] Delete the earlier version of Message Queue database tables. Used after the data store has been automatically migrated to the current version of Message Queue. recreate tbl [-u userName] [-p password] Delete Message Queue database tables and recreate Message Queue database schema in the current data store for a specified or default broker instance. reset lck Reset the database table lock to allow other processes to access database tables. ENVIRONMENT VARIABLES
The following environment variables affect the execution of this command: IMQ_JAVAHOME Specify the Java 2 compatible runtime. When this environment variable is not set it defaults to /usr/j2se. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/var/imq/instances/brokerName/dbstore Recommended directory in which to create an embedded database. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWiqu | +-----------------------------+-----------------------------+ SEE ALSO
imqadmin(1M), imqbrokerd(1M), imqcmd(1M), imqusermgr(1M), imqkeytool(1M), imqobjmgr(1M), attributes(5) Sun Java System Message Queue Administrator's Guide SunOS 5.10 29 Mar 2004 imqdbmgr(1M)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy