10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All ,
I am trying to merge two files each contain 16 lakh lines ..My requirement is i have merge after every 14 lines of each file .
Like from file1 14 lines then after after 14 lines form file2 ..so i wrote below script .
It is working for small files ,but large files script not... (10 Replies)
Discussion started by: Phani369
10 Replies
2. UNIX for Beginners Questions & Answers
Recall that nc-county-pop.dat has 100 lines, and each line corresponds to a county. The files girls.dat and boys.dat each has 50 lines. Assume that the girls come from the first 50 counties and each county has only one girl. That is the first girl comes from the first county, the second girl comes... (1 Reply)
Discussion started by: novicep11
1 Replies
3. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
4. Shell Programming and Scripting
I have been working of this script for a very long time and I have searched the internet for direction but I am stuck here.
I have about 3000 files with two columns each. The length of each file is 50000. Each of these files is named this way b.4, b.5, b.6, b.7, b.8, b.9, b.10, b.11, b.12... (10 Replies)
Discussion started by: iconig
10 Replies
5. UNIX for Dummies Questions & Answers
I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory)
diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//'
Is there a better more efficient way to find the lines in one file... (5 Replies)
Discussion started by: raptor25
5 Replies
6. Shell Programming and Scripting
I have one base file, and multiple target files-- each have uniform line structure so no need to use grep to find things-- can just define sections by line number.
My question is quite simple-- can I use sed to copy a defined block of lines (say lines 5-10) from filename1.txt to overwrite an... (3 Replies)
Discussion started by: czar21
3 Replies
7. Shell Programming and Scripting
I have about 20 CSV's that all look like this:
"","","","","","","","","","","","","","","",""What I've been told I need to produce is the exact same thing, but with each file now containing the start_code from every other file where the email matches.
It doesn't matter if any of the other... (1 Reply)
Discussion started by: Demosthenes
1 Replies
8. Shell Programming and Scripting
Hi,
I want to merge the lines starting with a comma symbol with the previous line of the file.
Input :
cat file.txt
name1,name2
,name3,name4
emp1,emp2,emp3
,emp4
,emp5
user1,user2
,user3
Output
name1,name2,name3,name4
emp1,emp2,emp3,emp4,emp5 (9 Replies)
Discussion started by: mohan_tuty
9 Replies
9. Shell Programming and Scripting
I need to write a script that reads through an input .txt file and replaces the end value with the end value of the next line for lines that have distance <=4000. The first label line is not actually in the input. In the below example, 3217 is the distance from the end of the first line to the... (12 Replies)
Discussion started by: awknerd
12 Replies
10. Shell Programming and Scripting
Hi there,
I have a couple of files I need to merge. I can do a simple merge by concatenating them into one larger file.
But then I need to filter the file to get a desired result.
The output looks like this:
TRNH 0000000010941
ORDH
OADR
OADR
ORDL
ENDT 1116399 000000003... (2 Replies)
Discussion started by: Meert
2 Replies