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. Shell Programming and Scripting
Hello,
I was trying to split a string to characters by perl oneliner.
echo "The quick brown fox jumps over the lazy dog" | perl -e 'split // ' But did not work as with bash script pipe:
echo "The quick brown fox jumps over the lazy dog" | fold -w1 | sort | uniq -ic 8
1 T
1... (6 Replies)
Discussion started by: yifangt
6 Replies
3. Shell Programming and Scripting
I had a text file(comma seperated values) which contains as below
196237,ram,25-May-06,ram.kiran@xyz.com,204183,Pavan,4-Jun-07,Pavan.Desai@xyz.com,237107,ram Chandra,15-Mar-10,ram.krishna@xyz.com ... (3 Replies)
Discussion started by: giridhar276
3 Replies
4. Shell Programming and Scripting
In PERL script
I have few files named theme1.htm,theme2.htm,theme3.htm and so on.
now I need to write perl code to split the the filename and store only that particular digit.
Example
--------------
filename is theme1.htm
output should be 1
another example
---------------... (5 Replies)
Discussion started by: giridhar276
5 Replies
5. Shell Programming and Scripting
Hi,
I have a unix shell script which generates a flat file after connecting to Teradata servers to fetch tables and views and also picks up modified unix scripts from the specified paths.
Later on the script calls a perl script to assign a value based on the type of object in the flat file which... (2 Replies)
Discussion started by: yohasini
2 Replies
6. Shell Programming and Scripting
Hi All,
I have two input file and need to generate a CSV file. The existing report just "GREP" the records with the Header and Tailer records with the count of records.
Now i need to split the data into 25 records each in the same CSV file.
id_file (Input file )
227050994
232510151... (4 Replies)
Discussion started by: rasmith
4 Replies
7. Shell Programming and Scripting
How do I split file into pieces with PERL?
IE
file.txt
head
1
2
3
4
end
head
5
6
7
8
9
end
n so on (7 Replies)
Discussion started by: 3junior
7 Replies
8. 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
9. Shell Programming and Scripting
Below is my perl script:
#!/usr/bin/perl
open(FILE,"$ARGV") or die "$!";
@DATA = <FILE>;
close FILE;
$join = join("",@DATA);
@array = split( ">",$join);
for($i=0;$i<=scalar(@array);$i++){
system ("/home/bin/./program_name_count_length MULTI_sequence_DATA_FILE -d... (5 Replies)
Discussion started by: patrick87
5 Replies
10. Shell Programming and Scripting
I want to split a given month into weeks. For example if I give the date in dd/mm/yy format say 01/02/08 it should give output in the given format :
week1 : start date and end date.
week2 : ""
week3 : ""
week4 : "" (5 Replies)
Discussion started by: khushbu_roy
5 Replies