split function


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers split function
Prev   Next
# 1  
Old 09-28-2005
split function

Hi all!
I am relatively new to UNIX staff, and I have come across a problem:
I have a big directory, which contains 100 smaller ones. Each of the 100 contains a file ending in .txt , so there are 100 files ending in .txt
I want to split each of the 100 files in smaller ones, which will contain 2000 lines each.
I think that 'split' command is what I must use, but I don't know how.
I go something like:

find . -name "*.txt" | .....

Any hints on the missing part? How can I apply the split command in each file, without entering each directory?
Thanx
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split function in HP UNIX

hi all, i have large file. where i need the split the files into two files. can anyone tell me what is the command for that? Unix OS :HP Unix. Thanks, arun. (2 Replies)
Discussion started by: arun888
2 Replies

2. Shell Programming and Scripting

Perl split function

my @d =split('\|', $_); west|ACH|3|Y|LuV|N||N|| Qt|UWST|57|Y|LSV|Y|Bng|N|KT| It Returns d as 8 for First Line, and 9 as for Second Line . I want to Process Both the Files, How to Handle It. (3 Replies)
Discussion started by: vishwakar
3 Replies

3. Shell Programming and Scripting

PERL split function

Hi... I have a question regarding the split function in PERL. I have a very huge csv file (more than 80 million records). I need to extract a particular position(eg : 50th position) of each line from the csv file. I tried using split function. But I realized split takes a very long time. Also... (1 Reply)
Discussion started by: castle
1 Replies

4. Homework & Coursework Questions

PERL split function

Hi... I have a question regarding the split function in PERL. I have a very huge csv file (more than 80 million records). I need to extract a particular position(eg : 50th position) of each line from the csv file. I tried using split function. But I realized split takes a very long time. Also... (0 Replies)
Discussion started by: castle
0 Replies

5. Homework & Coursework Questions

PERL split function

Hi... I have a question regarding the split function in PERL. I have a very huge csv file (more than 80 million records). I need to extract a particular position(eg : 50th position) of each line from the csv file. I tried using split function. But I realized split takes a very long time. Also... (1 Reply)
Discussion started by: castle
1 Replies

6. UNIX for Dummies Questions & Answers

Split Function Prefix Numbers

Hello, Hello, I use the following command to split a file: split -Number_of_Lines Input_File MyPrefix_ output is MyPrefix_a MyPrefix_b MyPrefix_c ...... Instead, how can I get numerical values like: MyPrefix_1 MyPrefix_2 MyPrefix_3 ...... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

7. Shell Programming and Scripting

perl-like split function for bash?

Hi! I'm doing bash shell scripting and would like to know if bash had something similar to perl's split function? Ultimately, I want to split two strings (delimeter = '.') and compare each of their values. Thus, I figured putting them in an array would be easiest. So i.e.: String 1:... (5 Replies)
Discussion started by: eur0dad
5 Replies

8. Shell Programming and Scripting

Use split function in perl

Hello, if i have file like this: 010000890306932455804 05306977653873 0520080417010520ISMS SMT ZZZZZZZZZZZZZOC30693599000 30971360000 ZZZZZZZZZZZZZZZZZZZZ202011302942311 010000890306946317387 05306977313623 0520080417010520ISMS SMT ZZZZZZZZZZZZZOC306942190000 30971360000... (5 Replies)
Discussion started by: chriss_58
5 Replies

9. Shell Programming and Scripting

awk - split function

Hi, I have some output in the form of: #output: abc123 def567 hij890 ghi324 the above is in one column, stored in the variable x ( and if you wana know about x... x=sprintf(tolower(substr(someArray,1,1)substr(userArray,3,1)substr(userArray,2,1))) when i simply print x (print x) I get... (7 Replies)
Discussion started by: fusionX
7 Replies

10. Shell Programming and Scripting

perl split function

$mystring = "name:blk:house::"; print "$mystring\n"; @s_format = split(/:/, $mystring); for ($i=0; $i <= $#s_format; $i++) { print "index is $i,field is $s_format"; print "\n"; } $size = $#s_format + 1; print "total size of array is $size\n"; i am expecting my size to be 5, why is it... (5 Replies)
Discussion started by: new2ss
5 Replies
Login or Register to Ask a Question
IMAGICK.GETITERATORINDEX(3)						 1					       IMAGICK.GETITERATORINDEX(3)

Imagick::getIteratorIndex - Gets the index of the current active image

SYNOPSIS
int Imagick::getIteratorIndex (void ) DESCRIPTION
Returns the index of the current active image within the Imagick object. This method is available if Imagick has been compiled against ImageMagick version 6.2.9 or newer. RETURN VALUES
Returns an integer containing the index of the image in the stack. ERRORS
/EXCEPTIONS Throws ImagickException on error. EXAMPLES
Example #1 Using Imagick.getIteratorIndex(3): Create images, set and get the iterator index <?php $im = new Imagick(); $im->newImage(100, 100, new ImagickPixel("red")); $im->newImage(100, 100, new ImagickPixel("green")); $im->newImage(100, 100, new ImagickPixel("blue")); $im->setIteratorIndex(1); echo $im->getIteratorIndex(); ?> SEE ALSO
Imagick.setIteratorIndex(3), Imagick.getImageIndex(3), Imagick.setImageIndex(3). PHP Documentation Group IMAGICK.GETITERATORINDEX(3)