Sponsored Content
Top Forums Shell Programming and Scripting Problem with a regular expression Post 302378732 by claw82 on Tuesday 8th of December 2009 03:51:50 PM
Old 12-08-2009
Ok , then

I use you solution with some modifications in my code and it works.

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Regular Expression Problem

Display all of the lines in a file that contain "Raspberry" followed later in the line by the letter "a" I tried: grep Raspberry*a filename that didn't work Anyone know a solution? (1 Reply)
Discussion started by: netmaster
1 Replies

2. Shell Programming and Scripting

Regular Expression problem

Hi guys I've been trying to write a regular expression. If I'm tryin to validate a sequence of characters as follows... AB1-232-623482-743 43/3 where a) any character after the "AB" can be any alphanumeric character b) the " 43/3" part is optional is there a quick neat way for me... (5 Replies)
Discussion started by: djkane
5 Replies

3. UNIX for Dummies Questions & Answers

Regular Expression Problem

this is how my xyz.log file loooks like :- info ( 816): CORE1116: Sun ONE Web Server 6.1SP5 B08/17/2005 22:09 info ( 817): CORE5076: Using from info ( 817): WEB0100: Loading web module in virtual server at info ( 817): WEB0100: Loading web module in virtual server at perl... (12 Replies)
Discussion started by: chris1234
12 Replies

4. Shell Programming and Scripting

New line problem of regular expression

could anybody tell me how i can add/append a new line using regular expression in vi on AIX? i've tried several ways before, but all of them failed. e.g. :%s/$/\n/ :%s/^/\v\r/ :( (1 Reply)
Discussion started by: wrl
1 Replies

5. Shell Programming and Scripting

problem with Regular expression as input in shell script

Hi, I have script which will take a string as input and search in a file. But when I want to search a pattern which has special characters script is ignoring it. For example: I want to search a pattern "\.tumblr\.com". shell script is removing \ (backslah) and trying to search... (7 Replies)
Discussion started by: Anjan1
7 Replies

6. Shell Programming and Scripting

Problem with regular expression

Witam, mam oto taki ciąg znaków: 8275610268 + 9012383215 =niepotrzebnytextPotrzebuję w bash'u wyciągnąć obie liczby (mają taką samą liczbę cyfr), zapisać je do osobnych zmiennych, ale coś nie idzie, kombinowałem z grepem, ale nie potrafię skleić tego wyrażenia regularnego, no i potem przypisać do... (7 Replies)
Discussion started by: menda90
7 Replies

7. Shell Programming and Scripting

SED (regular expression) problem ---

Hello, I would like to replace Line 187 of my file named run_example. The original line is below, including the spaces: celldm(1) = 6.00, I want it to become something like celldm(1) = 6.05, or celldm(1) = 6.10, where the number is stored in a variable called... (6 Replies)
Discussion started by: bluesmodular
6 Replies

8. Shell Programming and Scripting

Regular Expression problem

I have two input files (given below) and to compare each line of the File1 with each line of File2 starts with '>sample1'. If a match occurs and that matched line in the File2 contains another line or sequence of lines starting with "Chr" they have to be displayed in output file with that sample.... (8 Replies)
Discussion started by: hravisankar
8 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

Problem with Regular expression in awk

Hi, I have a file with two fields in it as shown below 14,30 28,30 16,30 22,30 21,30 3,30 Fields are separated by comma ",". I've been trying to validate the file based on the condition "each field must be a numeric value" I am using HP-UX OS. I have tried the following awk... (4 Replies)
Discussion started by: meetsriharsha
4 Replies
LDAP_MODIFY(3)						     Library Functions Manual						    LDAP_MODIFY(3)

NAME
ldap_modify, ldap_modify_s - Perform an LDAP modify operation LIBRARY
OpenLDAP LDAP (libldap, -lldap) SYNOPSIS
#include <ldap.h> int ldap_modify(ld, dn, mods) LDAP *ld; char *dn; LDAPMod *mods[]; int ldap_modify_s(ld, dn, mods) LDAP *ld; char *dn; LDAPMod *mods[]; void ldap_mods_free( mods, freemods ) LDAPMod **mods; int freemods; DESCRIPTION
The routine ldap_modify_s() is used to perform an LDAP modify operation. dn is the DN of the entry to modify, and mods is a null-termi- nated array of modifications to make to the entry. Each element of the mods array is a pointer to an LDAPMod structure, which is defined below. typedef struct ldapmod { int mod_op; char *mod_type; union { char **modv_strvals; struct berval **modv_bvals; } mod_vals; struct ldapmod *mod_next; } LDAPMod; #define mod_values mod_vals.modv_strvals #define mod_bvalues mod_vals.modv_bvals The mod_op field is used to specify the type of modification to perform and should be one of LDAP_MOD_ADD, LDAP_MOD_DELETE, or LDAP_MOD_REPLACE. The mod_type and mod_values fields specify the attribute type to modify and a null-terminated array of values to add, delete, or replace respectively. The mod_next field is used only by the LDAP server and may be ignored by the client. If you need to specify a non-string value (e.g., to add a photo or audio attribute value), you should set mod_op to the logical OR of the operation as above (e.g., LDAP_MOD_REPLACE) and the constant LDAP_MOD_BVALUES. In this case, mod_bvalues should be used instead of mod_values, and it should point to a null-terminated array of struct bervals, as defined in <lber.h>. For LDAP_MOD_ADD modifications, the given values are added to the entry, creating the attribute if necessary. For LDAP_MOD_DELETE modifi- cations, the given values are deleted from the entry, removing the attribute if no values remain. If the entire attribute is to be deleted, the mod_values field should be set to NULL. For LDAP_MOD_REPLACE modifications, the attribute will have the listed values after the modification, having been created if necessary. All modifications are performed in the order in which they are listed. ldap_modify_s() returns the LDAP error code resulting from the modify operation. This code can be interpreted by ldap_perror(3) and friends. The ldap_modify() operation works the same way as ldap_modify_s(), except that it is asynchronous, returning the message id of the request it initiates, or -1 on error. The result of the operation can be obtained by calling ldap_result(3). ldap_mods_free() can be used to free each element of a NULL-terminated array of mod structures. If freemods is non-zero, the mods pointer itself is freed as well. ERRORS
ldap_modify_s() returns an ldap error code, either LDAP_SUCCESS or an error if there was trouble. ldap_modify() returns -1 in case of trouble, setting the ld_errno field of ld. SEE ALSO
ldap(3), ldap_error(3), ldap_add(3) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.1.X RELEASEDATE LDAP_MODIFY(3)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy