Sponsored Content
Top Forums Shell Programming and Scripting Reading the Properties File From Shell script Post 302444936 by venukjs on Friday 13th of August 2010 08:10:35 AM
Old 08-13-2010
Reading the Properties File From Shell script

Hi,

I am new to the shell script please I need help for following question.
I have properties file name called "com.test.properties" I have No of key values in this properties.

Code:
com.person.name = xyz
com.person.age = 55
com.person.address = hello

I want read this properties but i have other properties also but i want read only
above properties.

I tried in the following way. but it's not working. because key is having .

Code:
#!/bin/sh
# Sample shell script to read and act on properties

# source the properties:
. com.test.properties

# Then reference then:
echo $com.person.name;

Please any one know any other way help thanks in advance

Thanks
Venu J

Moderator's Comments:
Mod Comment Use code tags please, ty.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies

2. Shell Programming and Scripting

file reading through shell script

For reading a file through shell script I am using yhe code : while read line do echo $line done<data.txt It reads all the line of that file data.txt. Content of data.txt looks like: code=y sql=y total no of sql files=4 a.sql b.sql c.sql d.sql cpp=n c=y total no of c files=1 (4 Replies)
Discussion started by: Dip
4 Replies

3. Shell Programming and Scripting

Problem with reading from a properties file

Hi, i have a properties file a.prop where entry is like PROCESS_IDX=0 Now in my shell schript i am doing like this. #!/bin/sh . a.prop .............. -....................... while read line do # tokenize the string by ",". var=(`echo $line | tr ',' ' '`) echo $PROCESS_IDX -->... (6 Replies)
Discussion started by: sailaja_80
6 Replies

4. Shell Programming and Scripting

reading in properties file

Hi Am new to this scripting stuff so bear with me. I got a script made now that reads in a properties file. The properties file is in the following format: 256= Bos, Sea, FRa 128= HEL I want to be able to read in each line of the file and split out the letter fields by the numbered field. This... (2 Replies)
Discussion started by: vsekvsek
2 Replies

5. Shell Programming and Scripting

Reading a property file through shell script???

Hi! i need a script that can read a property file. i.e., A script to read a "property" from property file. Read the property value and based on value of property, decide whether to start the some dataload activity or not. Its urngent. Can anyone help me out???:( (7 Replies)
Discussion started by: sukhdip
7 Replies

6. Shell Programming and Scripting

Error while reading from a file in shell script

Hi All, I'm writing a script to read a file line by line and then perform awk function on it. I am getting an error . My file has one name in it "James". I'm expecting my o/p to be youareJamesbond James ./users.sh: line 7: =: command not found #script to read file line by line #adding... (5 Replies)
Discussion started by: Irishboy24
5 Replies

7. Shell Programming and Scripting

Reading arguments for a shell script from file

I have a shell script that takes 2 arguments. I will have to execute this script multiple times with different values for the arguments. for example, ./shscript env1 value1 ./shscript env1 value2 ./shscript env2 value3 ./shscript env3 value4 ./shscript env1 value5 ./shscript env3... (24 Replies)
Discussion started by: goddevil
24 Replies

8. AIX

Reading .properties file on AIX and Windows

I have a FirstDoc application that integrates with SharePoint 2010. As per the FirstDoc install guide, I need to generate the sharepoint_authentication properties file and place it on the server and the 2 Windows boxes that contain other components of the app. The properties file I... (1 Reply)
Discussion started by: shoefiend
1 Replies

9. Shell Programming and Scripting

Shell script reading file slow

I have shell program as below #!/bin/sh echo ======= LogManageri start ========== #This directory is getting the raw data from remote server Raw_data=/opt/ftplogs # This directory is ready for process the data Processing_dir=/opt/processing_dir # This directory is prcoessed files and... (4 Replies)
Discussion started by: Chenchireddy
4 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
gnome-at-properties(1)						   User Commands					    gnome-at-properties(1)

NAME
gnome-at-properties - enable support for Assistive Technologies in GNOME SYNOPSIS
gnome-at-properties [gnome-std-options] DESCRIPTION
Use gnome-at-properties, the Assistive Technology preference tool, to enable assistive technologies in your desktop. You can use gnome-at- properties to specify that the following assistive technology applications start automatically when you log in: o Screenreader o Magnifier o On-screen Keyboard OPTIONS
The following options are supported: gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. EXAMPLES
Example 1: Launching Assistive Technology Preference Tool example% gnome-at-properties EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-at-properExecutable for Assistive Technology preference tool ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+------------------------------+ |Availability |SUNWgnome-desktop-preferences | +-----------------------------+------------------------------+ |Interface stability |External | +-----------------------------+------------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. cddb-slave2-properties(1), gnome-accessibility-keyboard-properties(1), gnome-background-properties(1), gnome-default-applications-proper- ties(1), gnome-file-types-properties(1), gnome-font-properties(1), gnome-keybinding-properties(1), gnome-keyboard-properties(1), gnome- mouse-properties(1), gnome-network-preferences(1), gnome-panel-preferences(1), gnome-session-properties(1), gnome-sound-properties(1), gnome-theme-properties(1), gnome-ui-properties(1), metacity-properties(1), gnome-std-options(5) NOTES
Written by Glynn Foster, Sun Microsystems Inc., 2004. SunOS 5.10 6 Sep 2004 gnome-at-properties(1)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy