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
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
3. Shell Programming and Scripting
Hello,
I have the string "/a/b/c/ddd.txt" and i want to get only the filename, in this case "ddd.txt". I have as something known in the script the pattern "/a/b/c/", so I`ve tried something like:
echo "/a/b/c/ddd.txt" | cut -d "/a/b/c/" -f2
but it doesn`t go, any help?.
thanks,
bye (2 Replies)
Discussion started by: rubber08
2 Replies
4. 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
5. 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
6. Shell Programming and Scripting
Can anybody let me know what following commands will do in perl
1.my $result = `/main/home/bin/iwex -l '$File1'`;
2.my $setcmd = "/main/home/bin/iwex -s \"$File2\" \"$File3\"";
where $File1 $File2 $File3 are regular files.
Please suggest something.
Ur welcome (4 Replies)
Discussion started by: millan
4 Replies
7. AIX
I need help to split a filename 'a0crk_user:A0-B0123$#%test' into a0crk_user and A0-B0123 and print the output under 2 different columns namely
User and Status.
for eg. the output should like below:
User Status
---- ------
a0crk_user A0-B0123 (3 Replies)
Discussion started by: mbak
3 Replies
8. 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
9. Shell Programming and Scripting
Hi,
I do not know if my subject is right, but I at least have your attention :)
Recently I posted a perl question related to this.
Now when someone starts my program using an asterics:
./dirinfo.pl /orapkg/ora0*/oradata/
It can contain multiple directories. The following command shows... (6 Replies)
Discussion started by: davidg
6 Replies
10. UNIX for Dummies Questions & Answers
I want to execute something like this:
find . -type f -regex '$REGEX' -print | xargs split -d -C $SIZE
The problem is that I want the name of the split files to be the same name as original files. So if my directory has two files called abc.txt and def.txt, then I want the split files to be... (1 Reply)
Discussion started by: namityadav
1 Replies