10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to cut a range of fields in awk. The below seems to work for removing field 50, but what is the correct syntax for removing a range ($50-$62). Thank you :).
awk
awk 'BEGIN{FS=OFS="\t"}{$50=""; gsub(/\t\t/,"\t")}1' test.vcf.hg19_multianno.txt > output.csv
Maybe:
awk... (6 Replies)
Discussion started by: cmccabe
6 Replies
2. UNIX for Dummies Questions & Answers
Hello Everyone,
I've got a comma-delimited file that looks like this:
0012,123 ,456 ,05/12/2014
0123,525 ,286 ,05/12/2014
0456,791 ,300 ,05/12/2014
1095,759 ,300 ,05/12/2014
1344,576 ,292 ,05/12/2014
1558,551 ,283 ,05/12/2014
002183719, , ... (9 Replies)
Discussion started by: Scottie1954
9 Replies
3. Shell Programming and Scripting
how can i remove records which have 2 same fields?
my file:
saeed 1 2 sa
vahid 2 3 45
reza 212 33 sa
amir 1 1 ui
reza 21 33 sa
i want to remove records which first and 3rd field of that are as the same, here line 3 and 5 must be removed. (3 Replies)
Discussion started by: saeed.soltani
3 Replies
4. Shell Programming and Scripting
Hi,
I am trying to use awk to remove all rows where the first 4 fields are duplicates. e.g. in the following data lines 6-9 would be removed, leaving one copy of the duplicated row (row 5)
Borgarhraun FH9822 ol24 FH9822_ol24_m20 ol Deformed c
Borgarhraun FH9822 ol24 ... (3 Replies)
Discussion started by: tomahawk
3 Replies
5. Shell Programming and Scripting
Hi,
I have a scenario like, I need to replace a hyphens(-) for date field alone in the file.
I have minus(-) sign for other fields it should remain as such, only for date fields hyphens must be removed. Please find the content for the file below:
sample.txt:
-----------... (4 Replies)
Discussion started by: G.K.K
4 Replies
6. Shell Programming and Scripting
Hi Friends,
I have large volume of data file as shown below.
Beganing or end of each filed, there are some blank spaces.
How do I remove those spaces?
AAA AAA1 | BBB BB1 BB2 |CC CCCC
DDDD DD | EEEEEEE EEEEEEEE | FFF FFFFFF FFFF
GG GGGGGG |HH HH ... (3 Replies)
Discussion started by: ppat7046
3 Replies
7. Shell Programming and Scripting
I'm working with a set of files where I'm trying to remove a set of characters from specific fields. The files are comma-delimited, and the characters I want to remove include:
- open parentheses - (
- close parentheses - )
- space followed by a dollar sign - $
I don't want to remove every... (1 Reply)
Discussion started by: HLee1981
1 Replies
8. Shell Programming and Scripting
Hi,
I have a source file as mentioned below: I want to remove all the extra spaces between the fields.
a b--------|sa df-------|3232---|3
sf sa------|afs sdf-----|43-----|33
a b c------|adfsa dsf---|23-32|23
*Here '-' idicates spaces
Now, I want output as below:
a b|sa df|3232|3... (7 Replies)
Discussion started by: srilaxmi
7 Replies
9. Shell Programming and Scripting
Hey ,
I have a file and it's having spaces for some of the fields in it. Like the one below. I want to remove the spaces in them through out the file. The spaces occur randomly and i can't say which field is having space. So please help. Here is sample file with spaces after 5th field. (3 Replies)
Discussion started by: dsravan
3 Replies
10. Shell Programming and Scripting
Dear All,
I have some data file.see below.
--------------ALARM CLEARING FROM SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN--------------
Alarm Record ID: 25196304
Event Time: 2006-08-28 13:41:35
Event Type: ... (1 Reply)
Discussion started by: Nayanajith
1 Replies