10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file where I want to delete all rows that have the same string for column 1. How do I go about doing that? Thanks!
Example Input:
aa 1
aa 2
aa 3
bb 4
bc 5
bb 6
cd 8
Output:
bc 5
cd 8 (4 Replies)
Discussion started by: evelibertine
4 Replies
2. Shell Programming and Scripting
there are 20 variables and I would like to delete the rows if 13th-20th columns are all NA.
Thank you!
FID IID aspirpre statihos fibrahos ocholhos arbhos betabhos alphbhos cacbhos diurehos numbcig.x toast1 toast2 toast3 toast4 ischoth1 ischoth2 ischoth3 ischoth4
101 101 1 1 1 1 1 2 1 2... (2 Replies)
Discussion started by: johnkim0806
2 Replies
3. UNIX for Dummies Questions & Answers
How do I go about deleting specific rows from a text file (given row number)? (5 Replies)
Discussion started by: evelibertine
5 Replies
4. UNIX for Dummies Questions & Answers
I know this is a complicated question but I will try to illustrate it with some data. I have a data file that looks like the following:
1341 NA06985 0 0 2 46.6432798439
1341 NA06991 NA06993 NA06985 2 48.8478948517
1341 NA06993 0 0 1 45.8022601455
1340 NA06994 0 0 1 48.780669145
1340... (1 Reply)
Discussion started by: evelibertine
1 Replies
5. Shell Programming and Scripting
Hi,
I want to delete rows whenever column one has the letters 'rpa'. The file is tab seperated.
e.g.
years 1
bears 1
cats 2
rpat 3
rpa99 4
rpa011 5
then removing 'rpa' containing rows based on the first column
years 1
bears 1
cats 2
thanks (7 Replies)
Discussion started by: phil_heath
7 Replies
6. Shell Programming and Scripting
Hi Guys,
I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language
the text file contains data in a pipe delimited format
sdfsdfs
sdfsdfsd
START_ROW
sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies
7. Shell Programming and Scripting
Hi I posted earlier. This is sorta similar but I want to delete rows that dont have R, T, Y or U.
Nam1 RTYU
Nam2 RRTT
Nam3 RYTU
Nam4 IRTT
So the output would look like this?
Nam1 RTYU
Nam2 RRTT
Nam3 RYTU
too many problems
thanks (3 Replies)
Discussion started by: kylle345
3 Replies
8. Shell Programming and Scripting
Hello,
I am supposed to process about 100 csv files. But these files have some extra lines at the bottom of the file. these extra lines start with a header for each column and then some values below. These lines are actually a summary of the actual data and not supposed to be processed. These... (8 Replies)
Discussion started by: cobroraj
8 Replies
9. Shell Programming and Scripting
Hi,
I have a file that has rows that start with # and ends with #. For example..
# hi text
JK NM
JK NM
JK K
JK NM
# no
# yes
So I want to remove the #'s and put them into another file. so the output will be two files..
File 1:
JK NM
JK NM
JK K
JK NM (3 Replies)
Discussion started by: phil_heath
3 Replies
10. Shell Programming and Scripting
I am getting some spaces between the two lines(rows) in file.i want delete that empty rows in the file
example
1 abc xyz
2 def jkl
like i am having lots of rows in a file i want to delete the spce between the two rows give any... (7 Replies)
Discussion started by: srivsn
7 Replies