Sponsored Content
Top Forums Shell Programming and Scripting Regular expression boolean in perl Post 302277850 by Rhije on Sunday 18th of January 2009 12:25:08 PM
Old 01-18-2009
Code:
$matchme = "some stuff";
if ( $matchme =~ m/[a-z]/ ) {
   print "Oh snap you matched.";
}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regular expression help in perl

Hi all, I am trying to match a multi line string and return the matching string in one line. Here is the perl code that I wrote: #!/usr/bin/perl my $str='<title>My title</title>'; if ($str =~ /(<title>)(+)(<\/title>)/ ){ print "$2\n"; } It returns : My title I want the... (3 Replies)
Discussion started by: sdubey
3 Replies

2. Shell Programming and Scripting

regular expression in perl

hi, i want to extract the sessionID from this line. QnA Session Id : here the output should be-- QnA_SessionID=128589 Thanks NT (3 Replies)
Discussion started by: namishtiwari
3 Replies

3. Shell Programming and Scripting

perl regular expression

Dear all, I have a simple issue on a perl regular expression. I want to get the characters in red from the next lines : POWER_key LEFT_key RIGHT_key OK_key DOWN_key and so on... Thanks in advance for reply. Ludo (1 Reply)
Discussion started by: lsaas
1 Replies

4. Shell Programming and Scripting

Regular expression in Perl

Hi, I need and expression for a word like abc_xyz_ykklm The expresion should indicate that the word starts with abc and end with ykklm but does not contain xyz string in the middle. Example: abc_tmn_ykklm is ok and abc_xyz_ykklm is not Ok. Please help. Regards. (1 Reply)
Discussion started by: asth
1 Replies

5. Shell Programming and Scripting

Need perl regular expression

Hi, I am looking for a Perl regular expression to match the below pattern of a java script file. var so = object.device.load('camera','value'); I want to grep out such lines present in the *.js files. The conditions are: a) the line may start with blank space(s) b) always the... (3 Replies)
Discussion started by: royalibrahim
3 Replies

6. Shell Programming and Scripting

Perl Regular Expression

Hello, I am trying to use perl LWP module to read and get a specfic URL page. The issue is that the URL ends with the data and time and time is not consistent it changes all the time. if anyone could help me how to write a regular expressin that would work in the LWP::UserAgent get function to... (0 Replies)
Discussion started by: bataf
0 Replies

7. Shell Programming and Scripting

Perl regular expression and %

Could you help me with this please. This regular expression seems to match for the wrong input #!/usr/bin/perl my $inputtext = "W1a$%XXX"; if($inputtext =~ m/+X+/) { print "matches\n"; } The problem seems to be %. if inputtext is W1a$XXX, the regex doesnot match.... (5 Replies)
Discussion started by: suppandi7
5 Replies

8. Shell Programming and Scripting

Hidden Characters in Regular Expression Matching Perl - Perl Newbie

I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense. ... (4 Replies)
Discussion started by: kittyluva2
4 Replies

9. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

10. Shell Programming and Scripting

Perl regular expression

Hi , I have the below array my @actionText = ("delivered to governor on 21/23/3345" , "deliver jllj" , "ram 2345/43"); When i am trying to grep the contents of array and if mathced substituting with the digitis or some date format from the element like below my @action = grep { $_ =~... (7 Replies)
Discussion started by: ragilla
7 Replies
scf_snapshot_create(3SCF)												 scf_snapshot_create(3SCF)

NAME
scf_snapshot_create, scf_snapshot_handle, scf_snapshot_destroy, scf_snapshot_get_parent, scf_snapshot_get_name, scf_snapshot_update, scf_instance_get_snapshot - create and manipulate snapshot handles and snapshots in the Service Configuration Facility SYNOPSIS
cc [ flag... ] file... -lscf [ library... ] #include <libscf.h> scf_snapshot_t *scf_snapshot_create(scf_handle_t *handle); scf_handle_t *scf_snapshot_handle(scf_snapshot_t *snap); void scf_snapshot_destroy(scf_snapshot_t *snap); int scf_snapshot_get_parent(const scf_snapshot_t *snap, scf_instance_t *inst); ssize_t scf_snapshot_get_name(const scf_snapshot_t *snap, char *buf, size_t size); int scf_snapshot_update(scf_snapshot_t *snap); int scf_instance_get_snapshot(const scf_instance_t *inst, const char *name, scf_snapshot_t *snap); A snapshot is an unchanging picture of the full set of property groups associated with an instance. Snapshots are automatically created and managed by the Solaris Management Facility. See smf(5). A snapshot consists of a set of snaplevels, each of which holds copies of the property groups associated with an instance or service in the resolution path of the base instance. Typically, there is one snaplevel for the instance and one for the instance's parent service. The scf_snapshot_create() function allocates and initializes a new scf_snapshot_t bound to handle. The scf_snapshot_destroy() function destroys and frees snap. The scf_snapshot_handle() function retrieves the handle to which snap is bound. The scf_snapshot_get_parent() function sets inst to the parent of the snapshot to which snap is set. The scf_snapshot_get_name() function retrieves the name of the snapshot to which snap is set. The scf_snapshot_update() function reattaches snap to the latest version of the snapshot to which snap is set. The scf_instance_get_snapshot() function sets snap to the snapshot specified by name in the instance specified by inst. To walk all of the snapshots, see scf_iter_instance_snapshots(3SCF). To access the snaplevels of a snapshot, see scf_snapshot_get_base_snaplevel(3SCF). Upon successful completion, scf_snapshot_create() returns a new scf_snapshot_t. Otherwise, it returns NULL. Upon successful completion, scf_snapshot_handle() returns the handle to which snap is bound. Otherwise, it returns NULL. Upon successful completion, scf_snapshot_get_name() returns the length of the string written, not including the terminating null byte. Oth- erwise, it returns NULL. The scf_snapshot_update() function returns 1 if the snapshot was updated, 0 if the snapshot had not been updated, and -1 on failure. Upon successful completion, scf_snapshot_get_parent() and scf_instance_get_snapshot() return 0. Otherwise, they return -1. The scf_snapshot_create() function will fail if: SCF_ERROR_INVALID_ARGUMENT The handle argument is NULL. SCF_ERROR_NO_MEMORY There is not enough memory to allocate an scf_snapshot_t. SCF_ERROR_NO_RESOURCES The server does not have adequate resources for a new instance handle. The scf_snapshot_handle() function will fail if: SCF_ERROR_HANDLE_DESTROYED The handle associated with snap has been destroyed. The scf_snapshot_get_name() and scf_snapshot_get_parent() functions will fail if: SCF_ERROR_DELETED The snapshot has been deleted. SCF_ERROR_NOT_SET The snapshot is not set. SCF_ERROR_NOT_BOUND The handle is not bound. SCF_ERROR_CONNECTION_BROKEN The connection to the repository was lost. The scf_snapshot_update() function will fail if: SCF_ERROR_DELETED An ancestor of the snapshot specified by snap has been deleted. SCF_ERROR_NOT_SET The snapshot specified by snap is not set. SCF_ERROR_NOT_BOUND The handle is not bound. SCF_ERROR_CONNECTION_BROKEN The connection to the repository was lost. SCF_ERROR_INVALID_ARGUMENT The snap argument refers to an invalid scf_snapshot_t. The scf_instance_get_snapshot() function will fail if: SCF_ERROR_DELETED The instance has been deleted. SCF_ERROR_NOT_SET The instance is not set. SCF_ERROR_NOT_FOUND The snapshot specified by name was not found. SCF_ERROR_INVALID_ARGUMENT The value of the name argument is not a valid snapshot name. SCF_ERROR_HANDLE_MISMATCH The instance and snapshot are not derived from the same handle. SCF_ERROR_NOT_BOUND The handle is not bound. SCF_ERROR_CONNECTION_BROKEN The connection to the repository was lost. The scf_error(3SCF) function can be used to retrieve the error value. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ libscf(3LIB), scf_error(3SCF), scf_iter_instance_snapshots(3SCF), scf_snapshot_get_base_snaplevel(3SCF), attributes(5), smf(5) 28 Sep 2005 scf_snapshot_create(3SCF)
All times are GMT -4. The time now is 10:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy