10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. Shell Programming and Scripting
Hi!
I want to delete N (say 10) lines after the line which text is found in a file "A".Also to delete the line in which the text is found.
Only one occurrence of the search string in the file "A"
The text to be deleted is in another text file "B". All the search texts in the file "B" are in... (3 Replies)
Discussion started by: shahid1632
3 Replies
3. Shell Programming and Scripting
Hi,
I'm trying to search for some number and from that line, i need to delete the 5th line exactly.
Eg:
Consider below as text file data:
10000
a
b
c
d
e
.
.
.
10000
w
q
t (8 Replies)
Discussion started by: Gautham
8 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file that looks like the following:
250 rs10000056 0.04 0.0888 4 189321617
250 rs10000062 0.05 0.0435 4 5254744
250 rs10000064 0.02 0.2403 4 127809621
250 rs10000068 0.01 NA
250 rs1000007 0.00 0.9531 2 237752054
250 rs10000081 0.03 0.1400 4 17348363... (5 Replies)
Discussion started by: evelibertine
5 Replies
5. Shell Programming and Scripting
We have a server that logs transactions to a file. I want to write a script that will delete the first 50 lines of the file daily without renameing the file or moving the file. (8 Replies)
Discussion started by: daveisme
8 Replies
6. UNIX for Advanced & Expert Users
How I can delete 100 lines anywhere in a file without opening a file and without renaming the file. (11 Replies)
Discussion started by: Nirgude07
11 Replies
7. UNIX for Dummies Questions & Answers
I have a file with 65 sets of 35 coordinates, and would like to isolate these coordinates so that I can easily copy the coordinates to another file. The problem is, I've got a 9 line header before each set of coordinates (so each set is 44 lines long). There are a zillion threads out there about... (3 Replies)
Discussion started by: red baron
3 Replies
8. Shell Programming and Scripting
I have a directory full of text data files.
Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application.
I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate... (3 Replies)
Discussion started by: vrms
3 Replies
9. Shell Programming and Scripting
How do I delete all the lines after the line containing text ***DISCLOSURES*** . I want to delete this line too.
Thank you (2 Replies)
Discussion started by: reachsamir
2 Replies
10. Shell Programming and Scripting
Hi
I have a file & always I need to remove or delete last 2 lines from that file. So in a file if I have 10 lines then it should return me first 8 lines.
Can someone help me? (4 Replies)
Discussion started by: videsh77
4 Replies