Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Emergency work question for a Unix dummy Post 302362230 by dr.house on Thursday 15th of October 2009 10:21:15 AM
Old 10-15-2009
Plan B Smilie

Code:
[house@leonov] echo "gi|10580442|gb|AAG19320.1| inosine-5'-monophosphate dehydrogenase-like [Halobacterium sp. NRC-1]" \
| tr '[]' '|' | awk -F '|' '{ print $2"\t"$6 }'
10580442        Halobacterium sp. NRC-1

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix dummy's question

:confused: Hi, 2 questions to get some insight. Thanks (1) I would like to add a prefix (XX00) in each row of the line in my text file and save a newly generated file another name. How to go about it. (2) How to insert a blank line into each row in my file. and save the file another name.... (2 Replies)
Discussion started by: merry susana
2 Replies

2. UNIX for Dummies Questions & Answers

question from a dummy

okay so I just started this unix class and understood all the test questions but this "normal" question threy me through a loop :confused:. The question is Why are UNIX commands noninteractive and why is their output not usually preceededby header information? This question has been driving me... (2 Replies)
Discussion started by: cinnamonbear
2 Replies

3. Filesystems, Disks and Memory

A simple dummy question

Hello Everyone! changing from Microsoft to Macintosh, I connected my hard disk (nearly full) to the apple computer, which could not recognize it. I was prompt to "initialize it", unfortunately I DECIDED YES!!, but just for 1/100 of a second: now I cannot access the hard disk at all. Is still... (1 Reply)
Discussion started by: NETTO68
1 Replies

4. UNIX for Dummies Questions & Answers

cut awk dummy question :)

how to make cut and awk treat "a b" as a single column rather then two separate columns "a and b"? how to remove " symbol from "a b" so there is only a b? Please help Regards Karol (14 Replies)
Discussion started by: sopel39
14 Replies

5. UNIX for Dummies Questions & Answers

a dummy question...needs help...

I am trying to use 'cut' to get a line from my file. But it seems that 'cut' recongnizes TAB as default. My file uses space instead. So 'cut' doesn't work. Anybody can tell me how to change the default from TAB to space ? Or how to transform a space-delimited file into tab-delimited file??... (2 Replies)
Discussion started by: kaixinsjtu
2 Replies

6. UNIX for Dummies Questions & Answers

dummy question on data process

I have a file which contains 6 columns. But I only need the first 3 columns. So I need to remove the last 3 columns. I checked 'cut' but it seems not working. So is there a command that could remove certain columns from a file? :( Thanks a lot!! (5 Replies)
Discussion started by: kaixinsjtu
5 Replies

7. UNIX for Dummies Questions & Answers

a dummy question on data processing

Hi, everyone, I have a matrix, let's say: 1 2 3 4 5 6 ... 4 5 6 7 8 9 ... 7 8 9 1 2 3 ... 3 4 5 6 7 8 ... ......... (nxm matrix) Is there a simple command that can take certain specific rows out of the matrix? e.g., I want to take row 2 (4 5 6 7 8 9 ...) and row 4 (3 4 5 6 7 8... (2 Replies)
Discussion started by: kaixinsjtu
2 Replies

8. IP Networking

DNS dummy question

Hello everyone, I have a some doubt about DNS. We have connected to 2 ISPs /ISP#1 and ISP#2/. Our web site's dns zone is located on ISP#1. If connection to ISP#1 is down clients won't find our website. ISP#1 connection went down few times this month. So we are going to create our website's... (0 Replies)
Discussion started by: sembii
0 Replies

9. UNIX for Dummies Questions & Answers

Dummy question on awk

Hi, I have a file which has three columns and 200 rows. I would like to print an extra column say "disco" for every 10 th row starting from 4 th row. How is that possible? Thnx (4 Replies)
Discussion started by: Indra2011
4 Replies

10. UNIX for Beginners Questions & Answers

Dummy Question

Where can I get UNIX? (1 Reply)
Discussion started by: ciao303
1 Replies
JOIN(1) 						      General Commands Manual							   JOIN(1)

NAME
join - relational database operator SYNOPSIS
join [-an] [-e s] [-o list] [-tc] file1 file2 DESCRIPTION
Join forms, on the standard output, a join of the two relations specified by the lines of file1 and file2. If file1 is `-', the standard input is used. File1 and file2 must be sorted in increasing ASCII collating sequence on the fields on which they are to be joined, normally the first in each line. There is one line in the output for each pair of lines in file1 and file2 that have identical join fields. The output line normally con- sists of the common field, then the rest of the line from file1, then the rest of the line from file2. Fields are normally separated by blank, tab or newline. In this case, multiple separators count as one, and leading separators are dis- carded. These options are recognized: -an In addition to the normal output, produce a line for each unpairable line in file n, where n is 1 or 2. -e s Replace empty output fields by string s. -o list Each output line comprises the fields specified in list, each element of which has the form n.m, where n is a file number and m is a field number. -tc Use character c as a separator (tab character). Every appearance of c in a line is significant. SEE ALSO
sort(1), comm(1), awk(1). BUGS
With default field separation, the collating sequence is that of sort -b; with -t, the sequence is that of a plain sort. The conventions of join, sort, comm, uniq, look and awk(1) are wildly incongruous. 7th Edition April 29, 1985 JOIN(1)
All times are GMT -4. The time now is 05:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy