Sponsored Content
Top Forums Shell Programming and Scripting Parsing a configuration Test tile Post 302166219 by edpdgr on Monday 11th of February 2008 10:42:48 AM
Old 02-11-2008
Parsing a configuration Test tile

Team I need help parsing a text file that meet the layout below:

high:850:856:214:855:810
med:852:304:310
low:315:240:323:310

I need to read each line and if for example a line start with high in in that same line there is a 850 or any other number then I wan to print it. The same ohld true for any other line.

Thank you
edpdgr
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

2. IP Networking

A test to ensure TCP/IP configuration is complete

Greetings. I have Debian lenny, and at the moment only the bare bones install, no GUI. I'm connecting via wireless to a Linksys router on a home network, and I manually configured a fixed ip etc during the install. I have not attempted to use any higher level apps such as ftp or telnet or apt yet.... (3 Replies)
Discussion started by: fguy
3 Replies

3. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

4. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

5. Shell Programming and Scripting

Prefixing test case methods with letter 'test'

Hi, I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Discussion started by: royalibrahim
5 Replies

6. Shell Programming and Scripting

Parsing the test file

Hello, I want to retrieve the rows with uniq count(column 4) for every *ref gene(column 7) on the basis of strand(column8 ) and tss(column 5). If a ref gene has same number of count and it is on negative strand then keep the row with its highest tss and likewise* If a ref gene has same number... (2 Replies)
Discussion started by: BCW_123
2 Replies
asetmasters(4)							   File Formats 						    asetmasters(4)

NAME
asetmasters, tune.low, tune.med, tune.high, uid_aliases, cklist.low, cklist.med, cklist.high - ASET master files SYNOPSIS
/usr/aset/masters/tune.low /usr/aset/masters/tune.med /usr/aset/masters/tune.high /usr/aset/masters/uid_aliases /usr/aset/masters/cklist.low /usr/aset/masters/cklist.med /usr/aset/masters/cklist.high DESCRIPTION
The /usr/aset/masters directory contains several files used by the Automated Security Enhancement Tool (ASET). /usr/aset is the default operating directory for ASET. An alternative working directory can be specified by the administrators through the aset -d command or the ASETDIR environment variable. See aset(1M). These files are provided by default to meet the need of most environments. The administrators, however, can edit these files to meet their specific needs. The format and usage of these files are described below. All the master files allow comments and blank lines to improve readability. Comment lines must start with a leading "#" character. tune.low These files are used by the tune task (see aset(1M)) to restrict the permission settings for system objects. Each file is tune.med used by ASET at the security level indicated by the suffix. Each entry in the files is of the form: tune.high pathname mode owner group type where pathname is the full pathname mode is the permission setting owner is the owner of the object group is the group of the object type is the type of the object It can be symlink for a symbolic link, directory for a directory, or file for everything else. Regular shell wildcard ("*", "?", ...) characters can be used in the pathname for multiple references. See sh(1). The mode is a five-digit number that represents the permission setting. Note that this setting represents a least restrictive value. If the current setting is already more restrictive than the specified value, ASET does not loosen the permission settings. For example, if mode is 00777, the permission will not be changed, since it is always less restrictive than the current setting. Names must be used for owner and group instead of numeric ID's. ? can be used as a "don't care" character in place of owner, group, and type to prevent ASET from changing the existing values of these parameters. uid_alias This file allows user ID's to be shared by multiple user accounts. Normally, ASET discourages such sharing for accountabil- ity reason and reports user ID's that are shared. The administrators can, however, define permissible sharing by adding entries to the file. Each entry is of the form: uid=alias1=alias2=alias3= ... where uid is the shared user id alias? is the user accounts sharing the user ID For example, if sync and daemon share the user ID 1, the corresponding entry is: 1=sync=daemon cklist.low These files are used by the cklist task (see aset(1M)), and are created the first time the task is run at the low, medium, cklist.med and high levels. When the cklist task is run, it compares the specified directory's contents with the appropriate cklist.high cklist.level file and reports any discrepancies. EXAMPLES
Example 1: Examples of Valid Entries for the tune.low, tune.med, and tune.high Files The following is an example of valid entries for the tune.low, tune.med, and tune.high files: /bin 00777 root staffsymlink /etc 02755 root staffdirectory /dev/sd* 00640 rootoperatorfile SEE ALSO
aset(1M), asetenv(4) ASET Administrator Manual SunOS 5.10 13 Sep 1991 asetmasters(4)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy