Find and replace data in text file with data in same file
OK I will do my best to explain what I need help with.
I am trying to format an ldif file so I can import it into Oracle oid.
I need the file to look like this example. Keep in mind there are 3000 of these in the file.
I have it to this point. Please keep in mind sometimes the userpassword: encrypted pass is in different places in the string of each user. Notice the userpassword: enc pass is not under the dn: line.
The long and short is I need to move the "userpassword: encryptep pass" up to directly under the dn field for each record. Is there anyway I can do this with awk or sed or something.
Any help would be greatly appreciated.
Tim
---------- Post updated at 03:28 PM ---------- Previous update was at 09:49 AM ----------
I found a work around.
Thanks for the consideration.
Tim
Last edited by zaxxon; 12-09-2009 at 10:50 AM..
Reason: code tags please
Hi ,
a:) i have configuration file with pattren
<Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output>
eg:
myfile.confg
9899000000,9899999999,DATA,b.dat
9899000000,9899999999,SMS,a.dat
b:) Stucture of my data file is... (3 Replies)
Hi all,
Sorry for the title, I was unsure how to word my issue. I'll get right to the issue. In my text file, I need to find all lines with the same data in the first field. Then I need to create a file with the matching lines merged into one. So my original file will look something like... (4 Replies)
Hi All,
I have two files one of which having some mobile numbers and corresponding value whose sample content as follows:
9058629605,8.0
9122828964,30.0
And in second file complete details of all mobile numbers and sample content as follows and delimeter used is comma(,):
... (8 Replies)
Hi,
So I'm kinda new to shell scripts and the like. I've picked up quite a bit of use from browsing the forums here but ran into a new one that I can't seem to find an answer for.
I'm looking to parse/find a string AND the next 15 or so charachters that follow the string within a text file... (1 Reply)
I have a .kml file. So I want filter the .kml to get only the tags that have this numeric codes that they are in a text file
11951
11952
74014
11964
11965
11969
11970
11971
11972
60149
74018
74023
86378
11976
11980
11983
11984
11987 (5 Replies)
Hi Guys,
Please help me with my problem here:
I have a source file:
1212 23232 343434 ASAS1 4
3212 23232 343434 ASAS2 4
3234 23232 343434 QWQW1 4
1134 23232 343434 QWQW2 4
3212 23232 343434 QWQW3 4
and a mapping... (4 Replies)
Dears,
I'm new to shell scripting and i was wondering if you can help me with following matter.
I have a file containing 400,000 records. The file contains two columns like:
00611291,0270404000005453
25262597,1580401000016155
25779812,1700403000001786
00388934,1200408000000880... (1 Reply)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Hello,
I have some text data that is in the form of multi-line records. Each record ends with the string $$$$ and the next record starts on the next line.
RDKit 2D
15 14 0 0 0 0 0 0 0 0999 V2000
5.4596 2.1267 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 ... (5 Replies)
Have three files. Any other approach with regards to file concatenation or splitting, etc is appreciated
If column55(billngtype) of file1 contains YMNC or YPBC then pick the value of column13(documentnumber). Now find this documentnumber in column1(Billdoc) of file2 and grep the corresponding... (4 Replies)
Discussion started by: as7951
4 Replies
LEARN ABOUT SUNOS
asadmin-create-file-user
asadmin-create-file-user(1AS) User Commands asadmin-create-file-user(1AS)NAME
asadmin-create-file-user, create-file-user - createsa new file user
SYNOPSIS
create-file-user --user admin_user [--password admin_password] [--host localhost][--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] [--userpassword user_password] [--groups user_groups:[user_groups]*] [--authrealmname
auth_realm_name] user_name
Creates an entry in keyfile with the specified username, userpassword, and groups. Multiple groups can be created by separating them with a
colon ":". If the auth_realm_name is not specified, an entry is created in the default keyfile. If auth_realm_name is specified, an entry
is created in the keyfile where the auth-realm name in the domain.xml file points to.
This command is supported in remote mode only.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
--interactive if set to true (default), only the required password options are prompted.
--userpassword password for the file user.
--groups group where the file user belongs to.
--authrealmname name, in the domain.xml file, where you have different stores for file auth realm.
OPERANDS
user_name name of file user to be created.
EXAMPLES
Example 1: Using the create-file-user command
It is assumed that an authority realm has already been created using the create-auth-realm command.
asadmin> create-file-user --user admin1 --password adminadmin1
--host pigeon --port 5001 --userpassword sample --groups staff:manager
--authrealmname auth-realm1 sample_user
Command create-file-user executed successfully
Where: the sample_user is the file user created.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-create-auth-realm(1AS)asadmin-delete-file-user(1AS), asadmin-list-file-users(1AS), asadmin-update-file-user(1AS), asadmin- list-
file-groups(1AS)J2EE 1.4 SDK March 2004 asadmin-create-file-user(1AS)