Sponsored Content
Top Forums Shell Programming and Scripting need help in splitting the file Post 302568936 by dsdev_123 on Friday 28th of October 2011 05:09:16 PM
Old 10-28-2011
Quote:
Originally Posted by joeyg
Is it always that format?
company line
detail line 1
detail line 2

and then repeat?
Could there ever be instances where more or less detail lines?
Hi

there would be instances where detailed level lines are not eqal and we might expect no detailed lines and just the header in some cases
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Splitting file] Extracting group of segments from one file to others

Hi there, I need to split one huge file into separate files if the condition is fulfilled according to that the position between 97 and 98 matches with “IT” at the segment MAS. There is no delimiter file is fix-width with varous line length. Could you please help me how I do split the file... (1 Reply)
Discussion started by: ozgurgul
1 Replies

2. UNIX for Dummies Questions & Answers

Splitting a file based on record sin another file

All, We receive a file with a large no of records (records can vary) and we have to split it into two files based on another file. e.g. File1: UHDR 2008112 "25187","00000022","00",21-APR-1991,"" ,"D",-000000519,+0000000000,"C", ,+000000000,+000000000,000000000,"2","" ,21-APR-1991... (7 Replies)
Discussion started by: er_ashu
7 Replies

3. Shell Programming and Scripting

splitting the file

Hi , I have one file which has many headers. Say suppose HEDAER ..data DATA DATA ..data ..data HEADER ..data ..data DATA .data HEADER. ..data ..data If there are 3 HEADERS in source file then I need to split the source file into 3 separate file.... (2 Replies)
Discussion started by: tanyaheerani
2 Replies

4. Shell Programming and Scripting

File splitting, naming file according to internal field

Hi All, I have a rather stange set of requirements that I'm hoping someone here could help me with. We receive a file that is actually a concatenation of 4 files (don't believe this would change, but ideally the solution would handle n files). The super-file looks like:... (7 Replies)
Discussion started by: Leedor
7 Replies

5. Shell Programming and Scripting

Splitting a file in to multiple files and passing each individual file to a command

I have an input file with contents like: MainFile.dat: 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 ... (4 Replies)
Discussion started by: rkrish
4 Replies

6. UNIX for Dummies Questions & Answers

Extracting data from one file, based on another file (splitting)

Dear All, I have two files but want to extract data from one based on another... can you please help me file 1 David Tom Ellen and file 2 David|0010|testnamez|resultsz David|0004|testnamex|resultsx Tom|0010|testnamez|resultsz Tom|0004|testnamex|resultsx Ellen|0010|testnamez|resultsz... (12 Replies)
Discussion started by: A-V
12 Replies

7. Shell Programming and Scripting

Splitting XML file on basis of line number into multiple file

Hi All, I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom. from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Discussion started by: ajju
14 Replies

8. Shell Programming and Scripting

Execution of loop :Splitting a single file into multiple .dat file

hdr=$(cut -c1 $path$file|head -1)#extract header”H” trl=$(cut -c|path$file|tail -1)#extract trailer “T” SplitFile=$(cut -c 50-250 $path 1$newfile |sed'$/ *$//' head -1')# to trim white space and extract table name If; then # start loop if it is a header While read I #read file Do... (4 Replies)
Discussion started by: SwagatikaP1
4 Replies

9. Shell Programming and Scripting

Splitting a text file into smaller files with awk, how to create a different name for each new file

Hello, I have some large text files that look like, putrescine Mrv1583 01041713302D 6 5 0 0 0 0 999 V2000 2.0928 -0.2063 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 5.6650 0.2063 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 3.5217 ... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

10. UNIX for Beginners Questions & Answers

Splitting the file based on two fields - Fixed length file

Hi , I am having a scenario where I need to split the file based on two field values. The file is a fixed length file. ex: AA0998703000000000000190510095350019500010005101980301 K 0998703000000000000190510095351019500020005101480 ... (4 Replies)
Discussion started by: saj
4 Replies
__gnu_pbds::detail::left_child_next_sibling_heap_const_iteratLi__gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >(3)

NAME
__gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc > - SYNOPSIS
Inherits __gnu_pbds::detail::left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc >. Public Types typedef base_type::const_pointer const_pointer typedef base_type::const_reference const_reference typedef _Alloc::difference_type difference_type typedef std::forward_iterator_tag iterator_category typedef base_type::pointer pointer typedef base_type::reference reference typedef base_type::value_type value_type Public Member Functions left_child_next_sibling_heap_const_iterator_ (node_pointer p_nd) left_child_next_sibling_heap_const_iterator_ () left_child_next_sibling_heap_const_iterator_ (const left_child_next_sibling_heap_const_iterator_< Node, _Alloc > &other) bool operator!= (const left_child_next_sibling_heap_const_iterator_< Node, _Alloc > &other) const bool operator!= (const left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc > &other) const const_reference operator* () const left_child_next_sibling_heap_const_iterator_ < Node, _Alloc > & operator++ ()" left_child_next_sibling_heap_const_iterator_ < Node, _Alloc > operator++ (int)" const_pointer operator-> () const bool operator== (const left_child_next_sibling_heap_const_iterator_< Node, _Alloc > &other) const bool operator== (const left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc > &other) const Public Attributes node_pointer m_p_nd Detailed Description template<typename Node, typename _Alloc>class __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc > Const point-type iterator. Definition at line 60 of file left_child_next_sibling_heap_/const_iterator.hpp. Member Typedef Documentation template<typename Node , typename _Alloc > typedef base_type::const_pointer __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::const_pointer Iterator's const pointer type. Definition at line 81 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > typedef base_type::const_reference __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::const_reference Iterator's const reference type. Definition at line 87 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > typedef _Alloc::difference_type __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::difference_type Difference type. Definition at line 72 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > typedef std::forward_iterator_tag __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::iterator_category Category. Definition at line 69 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > typedef base_type::pointer __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::pointer Iterator's pointer type. Definition at line 78 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > typedef base_type::reference __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::reference Iterator's reference type. Definition at line 84 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > typedef base_type::value_type __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::value_type Iterator's value type. Definition at line 75 of file left_child_next_sibling_heap_/const_iterator.hpp. Constructor &; Destructor Documentation template<typename Node , typename _Alloc > __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::left_child_next_sibling_heap_const_iterator_ () [inline] Default constructor. Definition at line 96 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::left_child_next_sibling_heap_const_iterator_ (const left_child_next_sibling_heap_const_iterator_< Node, _Alloc > &other) [inline] Copy constructor. Definition at line 101 of file left_child_next_sibling_heap_/const_iterator.hpp. Member Function Documentation template<typename Node , typename _Alloc > bool __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::operator!= (const left_child_next_sibling_heap_const_iterator_< Node, _Alloc > &other) const [inline] Compares content (negatively) to a different iterator object. Definition at line 111 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > bool __gnu_pbds::detail::left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc >::operator!= (const left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc > &other) const [inline], [inherited] Compares content (negatively) to a different iterator object. Definition at line 137 of file left_child_next_sibling_heap_/point_const_iterator.hpp. template<typename Node , typename _Alloc > const_reference __gnu_pbds::detail::left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc >::operator* () const [inline], [inherited] Access. Definition at line 124 of file left_child_next_sibling_heap_/point_const_iterator.hpp. template<typename Node , typename _Alloc > const_pointer __gnu_pbds::detail::left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc >::operator-> () const [inline], [inherited] Access. Definition at line 116 of file left_child_next_sibling_heap_/point_const_iterator.hpp. template<typename Node , typename _Alloc > bool __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >::operator== (const left_child_next_sibling_heap_const_iterator_< Node, _Alloc > &other) const [inline] Compares content to a different iterator object. Definition at line 106 of file left_child_next_sibling_heap_/const_iterator.hpp. template<typename Node , typename _Alloc > bool __gnu_pbds::detail::left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc >::operator== (const left_child_next_sibling_heap_node_point_const_iterator_< Node, _Alloc > &other) const [inline], [inherited] Compares content to a different iterator object. Definition at line 132 of file left_child_next_sibling_heap_/point_const_iterator.hpp. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ __gnu_pbds::detail::left_child_next_sibling_heap_const_iterator_< Node, _Alloc >(3)
All times are GMT -4. The time now is 11:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy