Sponsored Content
Top Forums Shell Programming and Scripting script to parse the properties file Post 302592045 by jim mcnamara on Sunday 22nd of January 2012 12:45:19 PM
Old 01-22-2012
I do not understand parse. Normally that means to break the file into components.
Not just count lines.

Are there comment lines? Please post a sample properties file
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do properties effect script?

Hi, I have noticed that rm -if will perform completely different to rm -fi. Whats the pattern of how I put my options to the script in relation to how it will act. i.e rm -fi treat the remove as interative but rm -if treats it as forced Thansk, Chris. (1 Reply)
Discussion started by: Chiefos
1 Replies

2. UNIX for Dummies Questions & Answers

File properties

Hi , I do have a line in my code as follows: if ] ; then ... else ... fi What does the -z does ? Similarly there is -s in some other part of the code. I guess there are many options like this.. Can anybody please tell what all options are available and what do they mean ? (2 Replies)
Discussion started by: risshanth
2 Replies

3. Shell Programming and Scripting

Help!!! Shell script to parse data file.

I am faced with a :confused: tricky problem to parse a data file ( May not be a tricky problem to the scripting guru's ). Here is what I am faced with. I have a file with multiple rows of data and the rows are not of fixed length. "|" is used as a delimiters for individual columns and each row... (3 Replies)
Discussion started by: yajaykumar
3 Replies

4. UNIX for Advanced & Expert Users

shell script to parse html file

hi all, i have a html file something similar to this. <tr class="evenrow"> <td class="data">added</td><td class="data">xyz@abc.com</td> <td class="data">filename.sql</td><td class="modifications-data">08/25/2009 07:58:40</td><td class="data">Added TK prof script</td> </tr> <tr... (1 Reply)
Discussion started by: sais
1 Replies

5. Shell Programming and Scripting

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. com.person.name = xyz com.person.age = 55 com.person.address = hello I want read this properties but i... (1 Reply)
Discussion started by: venukjs
1 Replies

6. Shell Programming and Scripting

Script to parse a file faster

My example file is as given below: conn=1 uid=oracle conn=2 uid=db2 conn=3 uid=oracle conn=4 uid=hash conn=5 uid=skher conn=6 uid=oracle conn=7 uid=mpalkar conn=8 uid=anarke conn=1 op=-1 msgId=-1 - fd=104 slot=104 LDAPS connection from 10.10.5.6 to 10.18.6.5 conn=2 op=-1 msgId=-1 -... (7 Replies)
Discussion started by: sags007_99
7 Replies

7. UNIX for Dummies Questions & Answers

Help to parse csv file with shell script

Hello ! I am very aware that this is not the first time this question is asked here, because I have already read a lot of previous answers, but none of them worked, so... As said in the title, I want to read a csv file with a bash script. Here is a sample of the file: ... (4 Replies)
Discussion started by: Grhyll
4 Replies

8. Shell Programming and Scripting

Script to parse bookmarks file

I am using Internet Explorer v10 at work and regularly need to import my personal Firefox bookmarks over. Long story short, I have found the import falling over on any bookmark elements which are over 256 characters. The bookmark file contains bookmarks of this format: <DT><A... (4 Replies)
Discussion started by: ozgadgetguy
4 Replies

9. Shell Programming and Scripting

Script parse file Linux

Hi all, I need help for a script that pulls out a series of numbers from a file (attached file) Basically I need a parse to write me in a variable: 9d424312 Can someone help me? Thank you (2 Replies)
Discussion started by: gianvitolinuxs
2 Replies

10. Homework & Coursework Questions

Script parse file

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: Hi all, I need help for a script that pulls out a series of numbers from a file (attached file) Basically I... (1 Reply)
Discussion started by: gianvitolinuxs
1 Replies
disklabel(8)						    BSD System Manager's Manual 					      disklabel(8)

NAME
disklabel -- manipulate and query an Apple Label disk label SYNOPSIS
disklabel -create disk-device [-msize=size] [property=value] [...] disklabel -status disk-device disklabel -properties disk-device [property[=value]] [...] disklabel -destroy disk-device DESCRIPTION
The disklabel utility manipulates ``Apple Label'' partition metadata. ``Apple Label'' partitions allow for a disk device to have a consis- tent name, ownership, and permissions across reboots, even though uses a dynamic pseudofilesystem for /dev. The ``Apple Label'' partition uses a set of metadata (as a plist) in a reserved area of the partition. This metadata describes the owner, name, and so forth. When -create is used, the -msize argument can specify the size of metadata area; the default is 128Kbytes. The default size unit is bytes, but the following suffixes may be used to multiply by the given factor: ``b'' (512), ``k'' (1024), ``m'' (1048576), and ``g'' (1073741824). Although any key-value pair can be specified for the properties, certain keys are used by the system: owner-uid The user (as either a string or numeric value) to own the device. owner-gid The group (as either a string or numeric value) associated with the device. owner-mode The permissions (as a numeric value) for the device. dev-name The name for the device. If the owner-uid and owner-gid properties are given as strings, the utility will attempt to look up the names (as users or groups, as appro- priate), and will store the numeric values in the metadata. If it cannot find the names, and the values are not given as numbers, it will print an error, and not store the key/value pairs in the metadata. The owner-mode property may be given in decimal, or in octal by using a preceding ``0'' (e.g., ``0666''). Any property may be forced to be treated as a string by enclosing it in double-quotation marks; bear in mind that shell escapes will probably be necessary in this sitation. The -properties directive can print out all keys (if no arguments are given), a requested set of keys (if a list of key names is given), or can modify (or add) keys (if a key-value pairs are given). also maintains a checksum of the metadata; the -status directive verifies this checksum. EXAMPLES
The following example will create a device with 1MByte of metadata area, owned by fred, with a device name of fred, and be writable by fred: disklabel -create /dev/rdisk1s1 -msize=1M owner-uid=fred dev-name=fred owner-mode=0644 The following example will then print out the key-value pairs from the above: disklabel -properties /dev/rdisk1s1 SEE ALSO
pdisk(8) BSD
September 3, 2004 BSD
All times are GMT -4. The time now is 03:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy