10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
Hi, I have a file like this:
aaa 123
aaa 223
aaa 225
bbb 332
bbb 423
bbb 6755
bbb 324
ccc 112
ccc 234
ccc 897
Which I need to split into several files, something like
split -l 3
but the way that the lines with the same names would only go into one file: (7 Replies)
Discussion started by: coppuca
7 Replies
3. Shell Programming and Scripting
Hi all
I have written Perl script to swap the strings in the second a third column from a text file.
My input file format is :
the|empty|the|det lake|empty|lake|conj_and was|empty|was|auxpass drained|empty|drained|conj_and birds|empty|bird|s|nn
The expected output file format is... (11 Replies)
Discussion started by: my_Perl
11 Replies
4. Shell Programming and Scripting
Hi,
I have file: data.log.1
### s1
main.build.3495
main.build.199
main.build.3408
###s2
main.build.3495
main.build.3408
main.build.199
I want to read this file and store in two arrays in Perl.
I have following command, which is working fine on command prompt.
perl -n -e... (1 Reply)
Discussion started by: ashvini
1 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a Input.txt document which contains data fields seperated by tabs. There are 4 fields totally Named UNIQUE, ORDER, CONTACT and WINS. The UNIQUE field contains unique ID and the CONTACT field contains data seperated by comma in some records. I am looking to write an awk script... (12 Replies)
Discussion started by: forumthreads
12 Replies
6. Shell Programming and Scripting
Hi
I have a large file 2.6 million records and I am trying to split the file based on last column.
I am doing
awk -F"|" '{ print > $NF }' filename1
After around 1000 splits it gives me a error
awk: can't open file 3332332423
input record number 1068, file filename1
source... (6 Replies)
Discussion started by: s_adu
6 Replies
7. Shell Programming and Scripting
Hello, maybe this post is offtopic, sorry for the inconveniencies (maybe should be in the forum with questions about C, C++, Java, SQL...).
I found examples about how to populate different fields from a text file (with MySQL, the LOAD DATA INFILE sentece), but not about how to load a complete... (2 Replies)
Discussion started by: aristegui
2 Replies
8. Shell Programming and Scripting
Hello
I have a file which is pipe delimited.
The 4 th field has value like 200704 or 200705 etc.
Now i have to get only those records where 4th field is 200704
How can i do this?
I have to get the whole record where 4th field = 200704 (7 Replies)
Discussion started by: vasuarjula
7 Replies
9. AIX
Hello
I have a file which is pipe delimited.
The 4 th field has value like 200704 or 200705 etc.
Now i have to get only those records where 4th field is 200704
How can i do this?
I have to get the whole record where 4th field = 200704 (4 Replies)
Discussion started by: vasuarjula
4 Replies
10. Shell Programming and Scripting
Hi all,
I have a field in the line, let's say argument $6, which is in the format 00.00
If i want to split the field to get rid of the "." in between of the amount, how can i do that i awk script?
I have it like this
split($6,a,".")
but it will get rid of the last 2 digits after the... (4 Replies)
Discussion started by: CamTu
4 Replies