Sponsored Content
Full Discussion: spliting up a large file
Top Forums Shell Programming and Scripting spliting up a large file Post 302360055 by aigles on Thursday 8th of October 2009 04:52:53 AM
Old 10-08-2009
You can do something like that ;
Code:
awk '
BEGIN    { frame = 1 }
1        { print > "frame" frame ".pdb" }
/ENDMDL/ { frame++ }
' inputfile

Jean-Pierre.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

spliting up a huge file

I have a file {filename} which contains 65000 records I need to split into 6 smaller files roughly 11000 records each. Can someone advise me of the Unix command to do so ? Many thanks (2 Replies)
Discussion started by: grinder182533
2 Replies

2. Shell Programming and Scripting

Spliting file based on condition

Hi, I have a comma separated file with millions of records in it. I have a requirement to split the file based on the value in a one of the columns. Suppose i have a text file with columns like C1, C2,C3,C4 Column C4 can hold the values either 01 or 02 03 or 04. I nned to extract... (2 Replies)
Discussion started by: Raamc
2 Replies

3. Shell Programming and Scripting

Spliting the file dynamically

i am creating the file , when this file reaches the size 2 GB, i need one message or fire (4 Replies)
Discussion started by: kingganesh04
4 Replies

4. UNIX for Dummies Questions & Answers

Caching while spliting a large file

Hi The scenario is like this. I need to split 5 files having size 3GB, 2GB, 4GB, 30GB and 20 GB respectively. The machine has 15GB heap space. Before starting split proces it was showing 15gb free space. Once the split process completed it showed 100 mb free and around 12GB cached. My... (3 Replies)
Discussion started by: siba.s.nayak
3 Replies

5. Shell Programming and Scripting

Spliting a file and renaming it's out put

Hi friends, I am new to unix. With the help of this site I wrote a script. But it's returning some errors pls help.:confused: Here is my specifications: I have a file obsrec_31583_090212.xls at /home/lingalma/temp/cdl I want it to mv to another temp folder called /home/lingalma/temp/obsrec... (6 Replies)
Discussion started by: raaj.manoj
6 Replies

6. UNIX for Dummies Questions & Answers

spliting a file

how would i split the file "file1" into smaller files containg lines of 15 (1 Reply)
Discussion started by: JamieMurry
1 Replies

7. Shell Programming and Scripting

File Spliting problem

I have a very big log file which looks like this: I need to split this file and create files with "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" as the delimiter. The file names need to be the contents of the next line after the delimiter(FIRST_ITEM,SECOND_ITEM...so on..). (7 Replies)
Discussion started by: engineer
7 Replies

8. Shell Programming and Scripting

Spliting file based field pattern

Hi all, i have file that looks like as below 2263881188,24570896,439,SOLO,SOLO_UNBEATABLE,E,+3.13,+0.00 2263881964,24339077,439,SOLO,SOLO_UNBEATABLE,F,-0.67,+0.00 2263883220,22619162,228,Bell,Bell_MONTHLY,E,-2.04,+0.00 2263883220,22619162,228,Bell,Bell_MONTHLY,F,-2.04,+0.00... (3 Replies)
Discussion started by: raghavendra.cse
3 Replies

9. Shell Programming and Scripting

Spliting log file

Hello, I want to split or cut a large size log file by year wise(eg 2009, 2010) .But the source file must not have the splited or cut lines after this process ,all of them must move to the destination folder.Does grep command have the fuctionality like cut and paste? I used grep -Ev command but... (17 Replies)
Discussion started by: jobycxa
17 Replies

10. Shell Programming and Scripting

Requirement of Spliting a text file in UNIX Programing

Hi, There is a requirement, needs to split the text file based on RC code present in text file. For this, needs to write a unix shell programing script for the above requirement. For example in text file, if there are distinct RC codes, then we needs to split into multiple text files. In... (1 Reply)
Discussion started by: Chandra2678
1 Replies
libcaca canvas frame handling(3caca)				      libcaca				      libcaca canvas frame handling(3caca)

NAME
libcaca canvas frame handling - Functions __extern int caca_get_frame_count (caca_canvas_t const *) Get the number of frames in a canvas. __extern int caca_set_frame (caca_canvas_t *, int) Activate a given canvas frame. __extern char const * caca_get_frame_name (caca_canvas_t const *) Get the current frame's name. __extern int caca_set_frame_name (caca_canvas_t *, char const *) Set the current frame's name. __extern int caca_create_frame (caca_canvas_t *, int) Add a frame to a canvas. __extern int caca_free_frame (caca_canvas_t *, int) Remove a frame from a canvas. Detailed Description These functions provide high level routines for canvas frame insertion, removal, copying etc. Function Documentation __extern int caca_get_frame_count (caca_canvas_t const *cv) Return the current canvas' frame count. This function never fails. Parameters: cv A libcaca canvas Returns: The frame count Referenced by caca_set_canvas_boundaries(). __extern int caca_set_frame (caca_canvas_t *cv, intid) Set the active canvas frame. All subsequent drawing operations will be performed on that frame. The current painting context set by caca_set_attr() is inherited. If the frame index is outside the canvas' frame range, nothing happens. If an error occurs, -1 is returned and errno is set accordingly: o EINVAL Requested frame is out of range. Parameters: cv A libcaca canvas id The canvas frame to activate Returns: 0 in case of success, -1 if an error occurred. References caca_add_dirty_rect(). Referenced by caca_set_canvas_boundaries(). __extern char const* caca_get_frame_name (caca_canvas_t const *cv) Return the current frame's name. The returned string is valid until the frame is deleted or caca_set_frame_name() is called to change the frame name again. This function never fails. Parameters: cv A libcaca canvas. Returns: The current frame's name. __extern int caca_set_frame_name (caca_canvas_t *cv, char const *name) Set the current frame's name. Upon creation, a frame has a default name of 'frame#xxxxxxxx' where xxxxxxxx is a self-incrementing hexadecimal number. If an error occurs, -1 is returned and errno is set accordingly: o ENOMEM Not enough memory to allocate new frame. Parameters: cv A libcaca canvas. name The name to give to the current frame. Returns: 0 in case of success, -1 if an error occurred. __extern int caca_create_frame (caca_canvas_t *cv, intid) Create a new frame within the given canvas. Its contents and attributes are copied from the currently active frame. The frame index indicates where the frame should be inserted. Valid values range from 0 to the current canvas frame count. If the frame index is greater than or equals the current canvas frame count, the new frame is appended at the end of the canvas. If the frame index is less than zero, the new frame is inserted at index 0. The active frame does not change, but its index may be renumbered due to the insertion. If an error occurs, -1 is returned and errno is set accordingly: o ENOMEM Not enough memory to allocate new frame. Parameters: cv A libcaca canvas id The index where to insert the new frame Returns: 0 in case of success, -1 if an error occurred. Referenced by caca_set_canvas_boundaries(). __extern int caca_free_frame (caca_canvas_t *cv, intid) Delete a frame from a given canvas. The frame index indicates the frame to delete. Valid values range from 0 to the current canvas frame count minus 1. If the frame index is greater than or equals the current canvas frame count, the last frame is deleted. If the active frame is deleted, frame 0 becomes the new active frame. Otherwise, the active frame does not change, but its index may be renumbered due to the deletion. If an error occurs, -1 is returned and errno is set accordingly: o EINVAL Requested frame is out of range, or attempt to delete the last frame of the canvas. Parameters: cv A libcaca canvas id The index of the frame to delete Returns: 0 in case of success, -1 if an error occurred. References caca_add_dirty_rect(). Author Generated automatically by Doxygen for libcaca from the source code. Version 0.99.beta18 Fri Apr 6 2012 libcaca canvas frame handling(3caca)
All times are GMT -4. The time now is 02:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy