04-28-2018
@vgersh99 - I really appreciate all the help, just want to ask one more thing.
Say my input file looks like below.
dn: serv=AAA,mscId=aaaaaa002aaaaaaaa426019001711495,ou=multiSCs,dc=btc
objectClass: CUDBService
serv: AAA
dn: serv=AAA,mscId=aaaaaa002aaaaaaaa426019001711250,ou=multiSCs,dc=btc
objectClass: CUDBService
serv: AAA
dn: serv=AAA,mscId=aaaaaa002aaaaaaaa426019001713072,ou=multiSCs,dc=btc
objectClass: CUDBService
serv: AAA
dn: serv=AAA,mscId=aaaaaa002aaaaaaaa426019001713017,ou=multiSCs,dc=btc
objectClass: CUDBService
serv: AAA
dn: serv=AAA,mscId=aaaaaa002aaaaaaaa426019001712815,ou=multiSCs,dc=btc
objectClass: CUDBService
serv: AAA
and i want to split the file into smaller 8 files, and all the above chunks of information starting with "dn: serv=AAA,mscId=" and seperated by a empty line. Is it possible to split time to smaller files such that each small file will have the entry starting with "dn: serv=AAA,mscId=" and end with an empty line, without disturbing the order/integrity of the input entries. (One liner command needed)
Kindly also explain the command interms of who the file manipulations is happening.
Thanks in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi all
im new to this forum..excuse me if anythng wrong.
I have a file containing 600 MB data in that. when i do parse the data in perl program im getting out of memory error.
so iam planning to split the file into smaller files and process one by one.
can any one tell me what is the code... (1 Reply)
Discussion started by: vsnreddy
1 Replies
2. UNIX for Dummies Questions & Answers
I have a file with a simple list of ids. 750,000 rows. I have to break it down into multiple 50,000 row files to submit in a batch process.. Is there an easy script I could write to accomplish this task? (2 Replies)
Discussion started by: rtroscianecki
2 Replies
3. Shell Programming and Scripting
hi Guys
i need some help here..
i have a file which has > 800,000 lines in it. I need to split this file into smaller files with 25000 lines each.
please help
thanks (1 Reply)
Discussion started by: sitaldip
1 Replies
4. Shell Programming and Scripting
Hi,
I have a big text file with m columns and n rows. The format is like:
STF123450001000200030004STF123450005000600070008STF123450009001000110012
STF234560345002208330154STF234590705620600070080STF234567804094562357688
STF356780001000200030004STF356780005000600070080STF356780800094562657687... (2 Replies)
Discussion started by: wintersnow2011
2 Replies
5. Shell Programming and Scripting
Help needed urgently please.
I have a large file - a few hundred thousand lines.
Sample
CP START ACCOUNT
1234556
name 1
CP END ACCOUNT
CP START ACCOUNT
2224444
name 1
CP END ACCOUNT
CP START ACCOUNT
333344444
name 1
CP END ACCOUNT
I need to split this file each time "CP START... (7 Replies)
Discussion started by: frustrated1
7 Replies
6. Shell Programming and Scripting
Hi,
I need to split a large array "@sharedArray" into 10 small arrays.
The arrays should be like @sharedArray1,@sharedArray2,@sharedArray3...so on..
Can anyone help me with the logic to do so :(:confused: (6 Replies)
Discussion started by: rkrish
6 Replies
7. Shell Programming and Scripting
I will simplify the explaination a bit, I need to parse through a 87m file -
I have a single text file in the form of :
<NAME>house........
SOMETEXT
SOMETEXT
SOMETEXT
.
.
.
.
</script>
MORETEXT
MORETEXT
.
.
. (6 Replies)
Discussion started by: sumguy
6 Replies
8. UNIX for Dummies Questions & Answers
hi ,
I have a requirement
input file:
1 1111111111111 108
1 1111111111111 109
1 1111111111111 109
1 1111111111111 110
1 1111111111111 111
1 1111111111111 111
1 1111111111111 111
1 1111111111111 112
1 1111111111111 112
1 1111111111111 112
The output should be, (19 Replies)
Discussion started by: mechvijays
19 Replies
9. UNIX for Dummies Questions & Answers
input file:
AD,00,--,---,---,---,---,---,---,--,--,---
AM,000,---,---,---,---,---,---
AR, ,---,--,---,---
AA,---,---,---,---
AT,---
AU,---,---,---
AS,---,---
AP,---,---,---
AI,---
AD,00,---,---,---, ,---,---,---,---,---,---
AM,000,---,---,---
AR,... (6 Replies)
Discussion started by: kcdg859
6 Replies
10. Shell Programming and Scripting
I have a perl script which splits a large file into chunks.The script is given below
use strict;
use warnings;
open (FH, "<monolingual.txt") or die "Could not open source file. $!";
my $i = 0;
while (1) {
my $chunk;
print "process part $i\n";
open(OUT, ">part$i.log") or die "Could... (4 Replies)
Discussion started by: gimley
4 Replies
LEARN ABOUT SUSE
nwclient
NWCLIENT(5) nwclient NWCLIENT(5)
NAME
nwclient - configuration file for NWClient program suite
DESCRIPTION
This manual page describes the rather simple format of the file $HOME/.nwclient, the configuration file for the NWClient program suite.
FILE FORMAT
The file $HOME/.nwclient consists of several lines, each describing a NWClient connection. Lines beginning with # and empty lines are
ignored as comments.
Because you can store passwords in .nwclient, the user programs will only scan .nwclient when only the file owner has access rights to the
file. The file must be have permissions 0600.
To specify a NWClient connection, the name of the file server, the user name to be used and a password is necessary. The server name and
the user name are specified as SERVER/USER, and the password is separated by a blank. The password field can be omitted. In this case the
user programs will ask you for a password. If you specify the password to be just a dash, then no password is used.
The first valid specification has a special meaning: If the user does not name a server on the command line, the first specification is
used as a 'preferred connection'.
An example might be the following:
# The preferred connection, the user is asked
# for a password
FS311/ME
# And a passwordless account on another server
CD-SERV/GUEST -
With these lines in $HOME/.nwclient, calling 'ncpmount /mnt' will mount the the file server FS311 with user name ME on /mnt after asking
the user for a password.
ncpmount -S cd-serv /cd will silently mount the server cd-serv on /cd.
nprint, pqlist and other user programs that require a valid login also look up $HOME/.nwclient to find a file server, a user name and pos-
sibly a password.
Please note that the access permissions of .nwclient MUST be 600, for security reasons.
SEE ALSO
ncpmount(8), ncpumount(8), slist(1), pqlist(1), nprint(1)
nwclient 12/27/1995 NWCLIENT(5)