Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Hi Folks,
I have the following requirement:
I have a file that is containing numerous queries. The tables name mentioned in the queries are in the following format : SchemaName.Tablename. e.g COPDB.TableName.
I need to take out all the COPDB.TableName pattern and write it to a different... (0 Replies)
Hi Folks,
I have the following requirement:
I have a file that is containing numerous queries. The tables name mentioned in the queries are in the following format : SchemaName.Tablename. e.g COPDB.TableName.
I need to take out all the COPDB.TableName pattern and write it to a different... (6 Replies)
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
All,
I have the following file:
--------------------------------------
#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services... (2 Replies)
Hi,
I am trying to get a result out of this but fails please help. Have two files /tmp/1 & /tmp/hosts.
/tmp/1
IP=123.456.789.01
WAS_HOSTNAME=abcdefgh.was.tb.dsdc
/tmp/hosts
123.456.789.01
I want this result in /tmp/hosts if hostname is already there dont want duplicate entry.
... (5 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
LEARN ABOUT OPENSOLARIS
scf_tmpl_iter_props
scf_tmpl_prop_create(3SCF) Service Configuration Facility Library Functions scf_tmpl_prop_create(3SCF)NAME
scf_tmpl_prop_create, scf_tmpl_prop_reset, scf_tmpl_prop_destroy, scf_tmpl_get_by_prop, scf_tmpl_iter_props - template property functions
SYNOPSIS
cc [ flag... ] file... -lscf [ library... ]
#include <libscf.h>
scf_prop_tmpl_t *scf_tmpl_prop_create(scf_handle_t *handle);
void scf_tmpl_prop_reset(scf_prop_tmpl_t *prop_tmpl);
void scf_tmpl_prop_destroy(scf_prop_tmpl_t *prop_tmpl);
int scf_tmpl_get_by_prop(scf_pg_tmpl_t *pg_tmpl,
const char *prop, scf_prop_tmpl_t *prop_tmpl, int flags)
int scf_tmpl_iter_props(scf_pg_tmpl_t *pg_tmpl, const char *fmri,
scf_prop_tmpl_t *prop_tmpl, int flags);
DESCRIPTION
The template property functions locate and give access to metadata about properties. They require that the template for the property group
containing the property has already been located by one of the scf_tmpl_pg_create(3SCF) suite of functions.
Once retrieved, the scf_prop_tmpl_t can be explored using the scf_tmpl_prop_name(3SCF) suite of functions.
Before calling scf_tmpl_get_by_prop() or scf_tmpl_iter_props(), the scf_prop_tmpl_t must be allocated by scf_tmpl_prop_create. The
scf_prop_tmpl_t can be reset to contain no template information with scf_tmpl_prop_reset(), so that it can be used to start an iteration
from scratch. All associated memory can be freed with scf_tmpl_prop_destroy().
The scf_tmpl_get_by_prop() function locates template data about the property name specified.
The scf_tmpl_iter_props() function iterates across all property templates defined in the specified property group template.
The iterator state for scf_tmpl_iter_props() is stored on the property template data structure. The data structure should be allocated with
scf_tmpl_prop_create(), and to continue the iteration the previously returned structure should be passed in as an argument.
RETURN VALUES
The scf_tmpl_get_by_prop() function returns -1 on failure and 0 on success.
The scf_tmpl_iter_props() function returns 1 on successful completion. If the iteration is complete, it returns 0. It returns -1 on error.
ERRORS
The scf_tmpl_get_by_prop() and scf_tmpl_iter_props() functions will fail if:
SCF_ERROR_BACKEND_ACCESS
The storage mechanism that the repository server (svc.configd(1M)) chose for the operation denied access.
SCF_ERROR_CONNECTION_BROKEN
The connection to the repository was lost.
SCF_ERROR_DELETED
The instance or its template property group has been deleted.
SCF_ERROR_HANDLE_DESTROYED
The handle passed in has been destroyed.
SCF_ERROR_INTERNAL
An internal error occurred.
SCF_ERROR_INVALID_ARGUMENT
One of the arguments is invalid.
SCF_ERROR_NO_MEMORY
There is not enough memory to populate the scf_prop_tmpl_t.
SCF_ERROR_NO_RESOURCES
The server does not have adequate resources to complete the request.
SCF_ERROR_NOT_BOUND
The handle is not currently bound.
The scf_tmpl_get_by_prop() function will fail if:
SCF_ERROR_NOT_FOUND
Template object matching property doesn't exist in the repository.
SCF_ERROR_TYPE_MISMATCH
Matching template object is the wrong type in the repository.
SCF_ERROR_PERMISSION_DENIED
The template could not be read due to access restrictions.
SCF_ERROR_TEMPLATE_INVALID
The template data is invalid.
The scf_tmpl_prop_create() function will fail if:
SCF_ERROR_INVALID_ARGUMENT The handle argument is NULL.
SCF_ERROR_NO_MEMORY There is no memory available.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO svc.configd(1M), scf_tmpl_pg_create(3SCF), scf_tmpl_prop_name(3SCF), attributes(5), smf_template(5)SunOS 5.11 28 Oct 2008 scf_tmpl_prop_create(3SCF)