Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Printing into two files under difference situation Post 302862105 by RudiC on Thursday 10th of October 2013 07:09:56 AM
Old 10-10-2013
You may also want to try this:
Code:
EXT=("YES" "NO")
for FN in *.gff
  do while read line
       do grep -Eqi "${line// /|}" name.txt
          echo "$line" >> ${FN%.gff}_${EXT[$?]}.gff
       done <"$FN"
  done

It depends on the two columns in *.gff being separated by one single blank only; if there's always and constantly three, try ${line// /|} for grep

Last edited by RudiC; 10-10-2013 at 03:33 PM.. Reason: pretty print
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A Challenging situation for the MODERATORS

Well, I hope this way you will respond to my inquiries. I have 4 unix servers,with static ips (though i dont think this is an issue)....i can telnet and rlogin from one to the other....if i FTP from on et othe other and try to execute : cd /user return /user : no such file or... (1 Reply)
Discussion started by: BAM
1 Replies

2. UNIX for Advanced & Expert Users

current situation

hello..what is the current situation or lastest version of UNIX?? Is there any where i can read more about it?? (2 Replies)
Discussion started by: joanne6298
2 Replies

3. Shell Programming and Scripting

sed situation

Hi, I'm looking for someone who can think in sed. Basically, I need the trailing characters on every line in a file to be deleted. These characters are all in capitals, and always follow a number, but they often vary in number For instance, on the line: 2006_10_9_p20_TALK I'd want to... (4 Replies)
Discussion started by: Laurel Maury
4 Replies

4. Programming

strange situation in file

Hi All, I am writing some data's into a file from C++ program. The files which i am writing is of fixed length . say 232 in length per line. I am writing as . my c code is as ... (0 Replies)
Discussion started by: arunkumar_mca
0 Replies

5. UNIX for Dummies Questions & Answers

help : crisis situation !!

Hi I had deleted important files from my company server :( the server is HPUX and i don't know how to undo rm command or how to restore the files .. iam appreciate for any help Thanx ... (5 Replies)
Discussion started by: Eisa
5 Replies

6. Shell Programming and Scripting

Comparing Columns and printing the difference from a particular file

Gurus, I have one file which is having multiple columns and also this file is not always contain the exact columns; sometimes it contains 5 columns or 12 columns. Now, I need to find the difference from that particular file. Here is the sample file: param1 | 10 | 20 | 30 | param2 | 10 |... (6 Replies)
Discussion started by: buzzusa
6 Replies

7. Shell Programming and Scripting

Columns comparision of two large size files and printing the difference

Hi Experts, My requirement is to compare the second field/column in two files, if the second column is same in both the files then compare the first field. If the first is not matching then print the first and second fields of both the files. first file (a .txt) < 1210018971FF0000,... (6 Replies)
Discussion started by: krao
6 Replies

8. Shell Programming and Scripting

Cat files situation

Hello, I am PhD student (Biomedical sciences) and very new to Linux. I need some help with the following task : I have files in the following format for their names : An_A1_nnn_R1.txt; An_A1_nnm_R1.txt; An_A1_nnoo_R1.txt An_A2_nnn_R1.txt; An_A2_nnm_R1.txt; An_A2_nno_R1.txt ... (8 Replies)
Discussion started by: Julio Finalet
8 Replies

9. Shell Programming and Scripting

Compare line and printing difference

Hi, I want to compare two files and print out their differences e.g: t1.txt a,b,c,d t2.txt a,b,c,d,e,f Output e,f Currently I do this long about way tr ',' '\n' <t1.txt >t1.tmp tr ',' '\n' <t2.txt >t2.tmp diff t1.tmp t2.tmp > t12.tmp I have to this comparison for 100 files, so... (3 Replies)
Discussion started by: wahi80
3 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
GFF2PS(1)						      General Commands Manual							 GFF2PS(1)

NAME
gff2ps - Produces PostScript graphical output from GFF-files. SYNOPSIS
gff2ps [options] -- gff_files DESCRIPTION
This program draws color-filled DotPlots from files with gff-formatted data fields. The program takes as input the annotated features on a genomic sequence in GFF format, and produces a visual output in PostScript. OPTIONS
-h Show summary of options. -H <option> Shows only help for the especified option. -V Verbose mode, a full report is sent to standard error (default only sends Warnings). -v Silent mode: Disable all warnings, no messages sent to standard error. -d Write (or rewrite if exists) default customfile. -D <default_custom_filename> Create a new default customfile with the given filename. -C <custom_filename> Load given custom file and append to default custom file (.gff2psrc). -s <page_size> Useful to modify page size (default is a4). -p Switches page orientation to Portrait (default is Landscape). -G <color_name> Sets color for FOREGROUND (default is black). -g <color_name> Sets color for BACKGROUND (default is white). -P <#> Sets how many pages are needed to split your output (default is one). -S <#> Zoom first nucleotide (default is sequence origin). -E <#> Zoom last nucleotide (default is sequence length). -B <#> Sets blocks per page (default is one). -N <#> Sets nucleotides per line (default is the largest sequence position from input gff-files). -b Blocks from left to right and from top to bottom (default is top to bottom first). -L Switch off Header (Title area). -T <title_string> Defining title (default is input gff filename). -t <subtitle_string> Defining subtitle (default is none). -l Does not show page numbering. -O Does not show date. -o Does not show time. -M <#> Number of major tickmarks per line (default 10). -K <#> Major tickmarks scale in nucleotides, default is nucleotide length for lines divided by major tickmarks number (see option -T). -m <#> Number of minor tickmarks between major tickmarks (default 10). -k <#> Minor tickmarks scale in nucleotides default is major tickmarks size divided by minor tickmarks number (see option -t). -w, -f Switch off displaying forward-strand(Watson) elements. -c, -r Switch off displaying reverse-strand(Crick) elements. -i Switch off displaying strand-independent elements. -0 <color_name> Sets color for frame "0" (default is blue). -1 Sets color for frame "1" (default is red). -2 Sets color for frame "2" (default is green). -3 Sets color for frame "." (default is orange). -n Switch off labels for element positions. -a Switch off CopyRight line on plot. ENVIRONMENT VARIABLES
There are three environmental variables that can be set by users to their pre ferences: + You can specify the path where GFF2PS can find the default files with the shell variable "GFF2PS_CFDIR". Default value is path where you are running GFF2PS. + You can also define the default custom filename you will like with the variable "GFF2PS_CUSTOMFILE", program default filename for custom file is ".gff2psrc". + GFF2PS needs to write few temporary files in a directory with permissions for current user to read and write. Default temporary direc- tory path is set to "/tmp/" but you can assign a different temporary directory path using the variable "GFF2PS_TMP". Setting those vars in Bourne-shell (bash): export GFF2PS_CFDIR="path" export GFF2PS_CUSTOMFILE="file_name" export GFF2PS_TMP="path" Using a C-Shell (csh): setenv GFF2PS_CFDIR "path" setenv GFF2PS_CUSTOMFILE "file_name" setenv GFF2PS_TMP "path" COMMENTS
* Colors defined are: Basic Colors: black white Variable Colors: grey magenta violet blue skyblue cyan seagreen green lime green yellow orange red brown You can get five color shades from Variable Colors with "verydark", "dark", "light" and "verylight" prefixes. An example: verydarksea- green darkseagreen seagreen lightseagreen verylightseagreen * Page Sizes defined are: From A0 to A10, from B0 to B10, 10x14, executive, folio, ledger, legal, letter, quarto, statement and tabloid. AUTHOR
gff2ps was written by Josep Francesc ABRIL FERRANDO <jabril@imim.es>. This manual page was written by Nelson A. de Oliveira <naoliv@gmail.com>, for the Debian project (but may be used by others). Tue, 22 Mar 2005 12:58:35 -0300 GFF2PS(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy