10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
I need to split a file by number of records and rename each split file with actual filename pre-pended with 3 digit split number.
What I have tried is the below command with 2 digit numeric value
split -l 3 -d abc.txt F (# Will Produce split Files as F00 F01 F02)
How to produce... (19 Replies)
Discussion started by: techedipro
19 Replies
2. Shell Programming and Scripting
I have following file:
FHEAD0000000001RTLG20161205110959201612055019
THEAD......
TCUST.....
TITEM....
TTEND...
TTAIL...
THEAD......
TCUST.....
TITEM....
TITEM.....
TTEND...
TTAIL...
FTAIL<number of lines in file- 10 digits;prefix 0><number of lines in file-2 - 10 digits- perfix 0>... (6 Replies)
Discussion started by: amitdaf
6 Replies
3. Shell Programming and Scripting
Hello,
I'm using Windows 7 ; sed, awk and gnuwin32 are installed.
I have a big text file I need to manipulate.
In short, I will have to split it in thousands of short files, then rename and save in a folder which name is based upon filename.
Here is a snippet of my big input.txt file (this... (4 Replies)
Discussion started by: sellig
4 Replies
4. Shell Programming and Scripting
Hello,
Need to split files into n number of files and rename the files
Example:
Input:
transaction.txt.1aa
transaction.txt.1ab
......
Output:
transaction.txt.1
transaction.txt.2
transaction.txt.3 (3 Replies)
Discussion started by: krux_rap
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a data file like below
messageid|email|timestamp
750452173|123@googlemail.com|2013-05-24 16:14:32
750464921|000@gmail.com|2013-06-13 19:38:01
750385426|001@googlemail.com|2013-01-06 12:06:36
750373470|000@wz.eu|2012-11-30 22:32:07
.
.
I want to split the files based on the... (4 Replies)
Discussion started by: armsaran
4 Replies
6. UNIX for Dummies Questions & Answers
I have a file named Me_thread_spell.txt that I want to split into smaller files. I want it to be split in each place there is a ;;;. For example,
blah blah blah ;;;
blah bhlah hlabl
awasnceuir
asenduhfoijhacseiodnbfxasd;;;
oabwcuhaweoir;;;
This full file would be three separate files... (7 Replies)
Discussion started by: mschpers
7 Replies
7. UNIX for Dummies Questions & Answers
Hi everyone,
I am trying to write an if statement that will split a file if it is over 1 million records/lines into files with say 900,000 records and then rename
those files without the aaa, aab, aac format that splitting normally does and into a specific naming convention. For instance, if... (2 Replies)
Discussion started by: coach5779
2 Replies
8. Solaris
Hello,
I'm searching with the Awk command to split a file into two others files.
I explain :
in the file N°1 I search the word "NameVirtual" and since that word to the end of the file I want to store all lines in a new file N°2
Also from that word to the beginning of the file I want to... (11 Replies)
Discussion started by: steiner
11 Replies
9. Shell Programming and Scripting
Hi All,
I have a requirement .I want to split a file and the split files should have certain names.
Currently when i use the split command
split -1000 testdata testdata_
Then the output is
testdata_aa
testdata_bb
testdata_cc
and so on.
But i want the output as
testdata1.snd... (3 Replies)
Discussion started by: dnat
3 Replies
10. Shell Programming and Scripting
Hi,
I have a problem in grepping a file for 2 strings and writing them to 2 appropriate files. I need to use the awk command and read the file only once and write to the appropriate file.
My file is very huge in size and it is taking a long time using cat command and grep command.
Can anyone... (3 Replies)
Discussion started by: m_subra_mani
3 Replies