10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I tried the following options but was unable to delete blank lines from file
Input file = temp.hash.txt
temp.hash.txt content
90
0
89.56
0
0
57575.4544
56.89 (9 Replies)
Discussion started by: uuuunnnn
9 Replies
2. Shell Programming and Scripting
Hi
I have a text file like below. THe content of the text will vary.
Entire text file have four consecutive lines followed with blank line.
I want to delete the occurrence of the two consicutive lines in the text file. I don't have pattern to match and delete. Just i need to delete all... (5 Replies)
Discussion started by: RJSKR28
5 Replies
3. Shell Programming and Scripting
I have 2 TXT files with with 8 columns in them(tab separated). First file has 2000 entries whereas 2nd file has 300 entries.
The first file has ALL the lines of second file. Now I need to remove those 300 lines (which are in both files) from first file so that first file's line count become... (2 Replies)
Discussion started by: prvnrk
2 Replies
4. Shell Programming and Scripting
Hi
Iam having file like below
10.238.52.65 pun-ras-bng-mhs-01 server
10.238.52.65 pun-ras-bng-mhs-01 10.10.10.10
10.238.52.65 pun-ras-bng-mhs-01 10.10.20.10
10.238.54.1 enk-ras-bng-cse-01 server
10.238.54.1 enk-ras-bng-cse-01 10.10.30.10
10.238.54.1 enk-ras-bng-cse-01 10.10.10.10
... (5 Replies)
Discussion started by: surender reddy
5 Replies
5. Shell Programming and Scripting
hi guys,
I have very large txt files (200GB) and just want to to delete the first two lines (headers). So far I used
sed -i '1,2d' infile.txtbut this command always takes extremely long as it writes all again. Is there a better way to do it (ie just to delete the lines without writing all... (2 Replies)
Discussion started by: TuAd
2 Replies
6. Shell Programming and Scripting
Hi All,
I have a file with 3 columns (Bank Name, Account Number and Amount). My requirement, I need to delete lines using Unix Shell script:
1. Which are having Alphanumeric characters in Account Number (eg. Line3).
2. Which are having 0.00 in amount. (eg. Line4)
3. And also I need to... (4 Replies)
Discussion started by: phani333
4 Replies
7. UNIX for Dummies Questions & Answers
Hi everybody!
I need to delete several vertical lines in a huge text file.
It should work like the example below. Delete the vertical lines 2 and 8.
123456789
masldfjla
afsajfwel
sajfljsaf
safsarfrl
sajfeljwq
1345679
msldfja
asajfwl
sjfljsf
sfsarfl
sjfeljq
Is there a... (11 Replies)
Discussion started by: relaxo
11 Replies
8. Shell Programming and Scripting
Hello,
Hello Firends,
I have file like below. I want to remove selected blocks say abc,pqr,lst. how can i remove those blocks from file.
zone abc {
blah
blah
blah }
zone xyz {
blah
blah
blah }
zone pqr {
blah
blah
blah } (4 Replies)
Discussion started by: nrbhole
4 Replies
9. Programming
Hi, experts,
I would like to create a function that can calculate the total number of lines in a saved text file and delete specific lines in that particular file (I only want the last few lines). Hav anybody have the experience and giv me a hand in this? (9 Replies)
Discussion started by: dniz
9 Replies
10. Shell Programming and Scripting
I am trying to delete all the lines out a file from a unix script. Please help
Platform is Sun (3 Replies)
Discussion started by: alnita
3 Replies