Questions tagged [csplit]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
106 views

Splitting a file based on values next to matching pattern

I am having a file input.txt which include ~50,000 rows and ~100 column. I want to split is according to matching entry followed by the matching patter. File separator are both space and tab. input....
0
votes
1answer
477 views

alternative to csplit - splitting after the pattern

I want to split a file after a delimiter, not before the delimiter, which is what csplit does. I can't find anything anywhere! (Also, why would there be a tool that specifically splits before a ...
5
votes
2answers
256 views

csplit not recognizing provided regexp

I'm working on this big file (DATA.DAT, ~900MB) which contains several other files. It's from a PS2 game. Sound samples (which are in .AIFF format), precisely what I'm after, make up most of its size....
3
votes
4answers
474 views

text processing rows to columns for a block

I have a file containing lists on Solaris: List A hi hello hw r u List B Hi Yes List C Hello I need to transpose the lists as shown below: List A List B List C hi Hi Hello ...
1
vote
2answers
433 views

How to split a file based on context?

I have some files that contain the results of the lldpneighbors command from all our servers. I would like to split these files into individual files for each server in order to make it easier to ...
2
votes
1answer
662 views

csplit regex with pipe (|)

i want to split file by regular expression, i have file format as below 0|t| lorem ... some text 138|t| title some text if i execute egrep "[0-9]+\|t\|" file | wc -l it counts occurrence ...
1
vote
2answers
67 views

Select the contents respective to some specific content from a file and move it to an output file

I have a file tnsnames.ora and its contents are as below. NEWDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = linuxerp.de.mph.com)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = ...
6
votes
3answers
1k views

Exclude delimiter with csplit

Is it possible to remove the delimiter with csplit? Example: $ cat in abc --- def --- ghi $ csplit -q in /-/ '{*}' $ ls x* xx00 xx01 xx02 $ head xx* ==> xx00 <== abc ==> xx01 <== --- ...
2
votes
1answer
4k views

Split a text file into multiple files, beyond the {99} limit of csplit

I'd like to split the contents of a .txt file into multiple files, but I'm encountering two questions about limitations of csplit: (1) can anyone offer a way around csplit's maximum limit of '99' ...
15
votes
4answers
44k views

Split a file into two

I have a big file and need to split into two files. Suppose in the first file the 1000 lines should be selected and put into another file and delete those lines in the first file. I tried using split ...