Sponsored Content
Top Forums Shell Programming and Scripting shell or perl script needed for ldif file to text file conversion Post 302516383 by LinuxFriend on Friday 22nd of April 2011 08:28:26 PM
Old 04-22-2011
shell or perl script needed for ldif file to text file conversion

This is the ldf file

dn: sdcsmsisdn=1000000049,sdcsDatabase=subscriberCache,dc=example,dc=com
objectClass: sdcsSubscriber
objectClass: top
postalCode: 29600
sdcsServiceLevel: 10
sdcsCustomerType: 14
givenName: Adelia
sdcsBlackListAll: FALSE
sdcsOwnerType: T-Mobile
sn: Actionteam
sdcsAccountStatus: active
sdcsCustomerId: 49
sdcsMsisdn: 1000000049
sdcsTimestamp: 20091120215911Z
ds-entry-unique-id:: JMYDmDjJRO2ZuZyJNy+u3Q==
ds-update-time:: AAABKCIkQn4=
ds-create-time:: AAABKCIkQn4=
creatorsName: cn=Directory Manager,cn=Root DNs,cn=config
modifiersName: cn=Directory Manager,cn=Root DNs,cn=config

dn: sdcsmsisdn=1000000051,sdcsDatabase=subscriberCache,dc=example,dc=com
objectClass: sdcsSubscriber
objectClass: top
postalCode: 61671
sdcsServiceLevel: 3
sdcsCustomerType: 76
givenName: Adelina
sdcsBlackListAll: FALSE
sdcsOwnerType: T-Mobile
$ head -50 output.ldif
dn: dc=example,dc=com
objectClass: domain
objectClass: top
dc: example
ds-sync-generation-id: 249287103
ds-entry-unique-id:: VMicRTJ7PTiKLreBTeZRpA==
ds-sync-state: 0000012F4D618697103601BA8A19
ds-sync-state: 0000012F4D61806B582F01C46148
ds-sync-state: 0000012822FE4A99580300000003
ds-sync-state: 0000012F4D6186EA2EB204A888F1
ds-sync-state: 0000012A6AAAB90745AE0008165F
ds-sync-state: 0000012A81FDF1CA371F00006AC7
ds-sync-state: 0000012823020EA5156100000002
ds-sync-state: 0000012F4D6186965AD401BAF320
aci: (targetattr!="userPassword")(version 3.0; acl "Allow anonymous read access for anyone"; allow (read,search,compare) userdn="ldap:///anyone"Smilie
aci: (targetattr="*")(version 3.0; acl "Allow users to update their own entries" ; allow (write) userdn="ldap:///self"Smilie

I'm looking for Postalcode, sdcsServiceLevel, sdcsCustomerType, sdcsAccountStatus, sdcsCustomerID, sdcsMsisdn, sdcsFeature, sn, givenName values to be extracted and put in the text file as



29600,10,14,active,49,1000000049,,Actionteam,Adelia


---------- Post updated at 04:28 PM ---------- Previous update was at 04:28 PM ----------

the last one is text file format . Urgent please
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell scripts to grep dn in ldif file

Hi gurus out there, 1)I am using ksh, in solaris 10. 2)I have one ldif file, I need to output user DN with attributes=<some pattern> to a file. Example: dn: uid=joy,ou=People,o=abc.com,o=isp nswmExtendedUserPrefs: meAutoSign=true nswmExtendedUserPrefs: meSignature=Regards, Joy... (3 Replies)
Discussion started by: bulkbiz
3 Replies

2. Shell Programming and Scripting

Simple Script needed for Processing CSV file perl

I am new to perl, and need a script to pull a CSV file, strip out 2 leading columns, and 2 ending columns, and resave the file in a new location. The file is basic and has less than 10,000 records. Secondly, can I schedule perl scripts to run daily? Can someone provide the basic script to... (1 Reply)
Discussion started by: cobbjob
1 Replies

3. Shell Programming and Scripting

Help me with file conversion [Shell Script]

Hello Group, I request your help with a shell script for filter an ascii file (this is small piece of the file): 09/24/2009,00:00,1.0268,1.0268,1.0249,1.0250,518 09/24/2009,01:00,1.0251,1.0261,1.0249,1.0259,424 09/24/2009,02:00,1.0258,1.0272,1.0258,1.0269,372... (3 Replies)
Discussion started by: csierra
3 Replies

4. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

5. Shell Programming and Scripting

Conversion of below Tabs Tex file into CSV format file : shell script needed

Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given Name Domain Contact Phone Email Location ----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
Discussion started by: sreenath1037
7 Replies

6. Shell Programming and Scripting

Conversion of spaces Text file into CSV format file

Input file (each line is separaed by spaces )given below: Name Domain Contact Phone Email Location ----------------------- ------------------------------------------------ ------- -----... (18 Replies)
Discussion started by: sreenath1037
18 Replies

7. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

8. Shell Programming and Scripting

Help needed in calling path file from Perl script.

Hi All, I need help in accessing a path file (path.xyz_pqr) not having a shell shebang and exporting paths in the following syntax, export DB_SCRIPT_PATH="/abc/aash/scripts/db_scripts/xyz_pqr" export SRC_FILES_DIR="/bcd/fdw/incoming/xyz_pqr" I need to use the path contained in the... (8 Replies)
Discussion started by: xtatic
8 Replies

9. Shell Programming and Scripting

Help required for Oracle database shutdown script conversion from shell to perl

Please tell me how to convert below program from shell script to perl. Same commands need to use in shutdown, just need program help for startup. export ORACLE_BASE=/home/oracle1 lsnrctl start lndb1 sqlplus '/ as sysdba' startup; (2 Replies)
Discussion started by: learnbash
2 Replies

10. Shell Programming and Scripting

Needed shell script to append desired text to each line in a file

Hi, I had generated a report in my tool as followsoutput.txt 43.35 9 i needed the script to generate a new file like below i want to append the text to each of these lines of my filenewoutputfile.txt should be Total Amount : 43.35 Record Count:9 Regards, Vasa Saikumar. ... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
GLFENCESYNC(3G) 						  [FIXME: manual]						   GLFENCESYNC(3G)

NAME
glFenceSync - create a new sync object and insert it into the GL command stream C SPECIFICATION
GLsync glFenceSync(GLenum condition, GLbitfield flags); PARAMETERS
condition Specifies the condition that must be met to set the sync object's state to signaled. condition must be GL_SYNC_GPU_COMMANDS_COMPLETE. flags Specifies a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and flags must be zero.[1] DESCRIPTION
glFenceSync creates a new fence sync object, inserts a fence command into the GL command stream and associates it with that sync object, and returns a non-zero name corresponding to the sync object. When the specified condition of the sync object is satisfied by the fence command, the sync object is signaled by the GL, causing any glWaitSync(), glClientWaitSync() commands blocking in sync to unblock. No other state is affected by glFenceSync or by the execution of the associated fence command. condition must be GL_SYNC_GPU_COMMANDS_COMPLETE. This condition is satisfied by completion of the fence command corresponding to the sync object and all preceding commands in the same command stream. The sync object will not be signaled until all effects from these commands on GL client and server state and the framebuffer are fully realized. Note that completion of the fence command occurs once the state of the corresponding sync object has been changed, but commands waiting on that sync object may not be unblocked until after the fence command completes. NOTES
glFenceSync is only supported if the GL version is 3.2 or greater, or if the ARB_sync extension is supported. .SH "ERRORS" GL_INVALID_ENUM is generated if condition is not GL_SYNC_GPU_COMMANDS_COMPLETE. GL_INVALID_VALUE is generated if flags is not zero. Additionally, if glFenceSync fails, it will return zero. SEE ALSO
glDeleteSync(), glGetSync(), glWaitSync(), glClientWaitSync() COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. NOTES
1. flags is a placeholder for anticipated future extensions of fence sync object capabilities. [FIXME: source] 05/30/2012 GLFENCESYNC(3G)
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy