Sponsored Content
Full Discussion: Using multiple pipe output
Top Forums UNIX for Dummies Questions & Answers Using multiple pipe output Post 302682617 by jim mcnamara on Monday 6th of August 2012 01:40:25 PM
Old 08-06-2012
Code:
#!/bin/bash
find . -type f -name \*.sff |
while read fname 
do
  python /usr/local/bin/sff_extract.py $fname
  iname=${fname/.sff/.fastq/}
  oname=${fname/.sff/.fasta/}
  awk 'BEGIN{P=1}
     {if(P==1||P==2){gsub(/^[@]/,">");print}; if(P==4)P=0; P++}' $iname > $oname

try that
 

10 More Discussions You Might Find Interesting

1. Programming

How to use pipe() in multiple threads?

Hi, I have a program that runs two threads in stead of two processes. I want to use pipe to redirect the output of the first thread to the input of the second thread. One thread is continuously writing to a pipe, and the other thread will read from the pipe. How do I do that? Is there... (2 Replies)
Discussion started by: wminghao
2 Replies

2. Programming

output string message to pipe

i am new to linux programming. can anyone answer my question? there is one pipe file "my_pipe" prw-r--r-- 1 john rnd 32 Aug 17 19:45 my_pipe how to output string message (char*) to this pipe? which API should I use? (3 Replies)
Discussion started by: princelinux
3 Replies

3. Shell Programming and Scripting

how to pipe output of here-document!!

anybody can help, plz: I want to pass the output of "ls" to "grep": ftp -n host <<! USER user passwd ls bye ! | grep file exit 0 It does not work!! Any idea?? Sami (7 Replies)
Discussion started by: sami98
7 Replies

4. UNIX for Dummies Questions & Answers

pipe output to two files

I am using grep and I want the output to go into two files without going to the screen. I used tee to get the output into two files, but it is also putting the output on the screen which i do not want. Can this be fixed. (2 Replies)
Discussion started by: NobluesFDT
2 Replies

5. UNIX for Dummies Questions & Answers

is there any way of using rm command on output of pipe

Hi, I am having a list of directories with different login id's. My requirement is that i need to list the directories of my id and need to delete them. So i am using following code ls -ltr ¦ grep userid ¦ rm -rf But this is not working. So is there any way of doing it. Please note... (3 Replies)
Discussion started by: sarbjit
3 Replies

6. UNIX for Dummies Questions & Answers

Use awk to pipe output from one file into multiple files

Hi All. Thanks for your help in advance. I have a requirement to examine the number of delimiters in each record of a file. If the record has the expected number of delimiters it should be passed into a 'good' file. If it does not, the record should be passed into a 'bad' file. I have been able... (8 Replies)
Discussion started by: codestar1
8 Replies

7. UNIX for Dummies Questions & Answers

pipe > output

I can use pipe output to a file. For example ./somescript.sh > output.txt But for example if the output from ./somescript.sh is slow. like if it prints one line every minute then output.txt is not updated every minute. Lines are written to output.txt in one go, hence have to wait for the whole... (2 Replies)
Discussion started by: kevincobain2000
2 Replies

8. Shell Programming and Scripting

Pipe delimited output

Hi All, i have the following command df|awk '{print $5}'|grep /| egrep -v '^/$|/usr|/opt|/var/log|/home|/tmp' output looks like: /filesystem/number1 /filesystem/number2 /filesystem3 /possiblymoreoutput i want the output to look like the below (either in a file or to output to... (3 Replies)
Discussion started by: Tommyk
3 Replies

9. Shell Programming and Scripting

Coulering pipe output

I'm trying to get an output to echo on the next line in a given color and outputted next to a label. Sorry if that's a bit vague, see below. #!/bin/bash YELLOW=$(tput setaf 3 && tput bold) echo -n 'plaintext' | openssl md2 || read hash echo "$YELLOW Hash:$hash" But I can't seem to get the... (2 Replies)
Discussion started by: 3therk1ll
2 Replies

10. Shell Programming and Scripting

Grep from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies
mcxmap(1)							  USER COMMANDS 							 mcxmap(1)

  NAME
      mcxmap - permute or remap the indices of graphs and matrices.

  SYNOPSIS
      mcxmap -imx fname (input) [-o fname (output)] [-make-map (output map file name)] [-make-mapc (output map file name)] [-make-mapr (output map
      file name)] [-cmul a (coefficient)] [-cshift b (translate)] [-rmul c (coefficient)] [-rshift d (translate)] [-mul e (coefficient)] [-shift f
      (translate)]  [-map  fname  (row/col  map file)] [-rmap fname (row map file)] [-cmap fname (column map file)] [-mapi fname (row/col map file
      (use inverse))] [-rmapi fname (row map file (use inverse))] [-cmapi fname (column map file (use inverse))] [-tab fname (read (and  map)  tab
      file)]

  DESCRIPTION
      This utility relabels graphs or matrices. Its main use is in applying a map file to a given matrix or graph. A map file contains a so called
      map matrix in mcl format that has some special properties (given further below). The functionality of mcxmap can also be provided by mcx, as
      a  mapped  matrix  (i.e.	the  result  of  applying a map matrix to another matrix) is simply the usual matrix product of a matrix and a map
      matrix. However, mcx will construct a new matrix and leave the original matrix to be mapped alone. When dealing with huge matrices,  consid-
      erable  gains  in  efficiency  memory-wise  and  time-wise  can be achieved by doing the mapping in-place.  This is what mcxmap does. In the
      future, its functionality may be embedded in mcx with new mcx operators.

      The special properties of a map matrix are

      o The column domain and row domain are of the same cardinality.
      o Each column has exactly one entry.
      o Each row domain index occurs in exactly one column.

      These properties imply that the matrix can be used as a map from the column domain onto the row domain.  An example map matrix is  found	in
      the EXAMPLES Section.

  OPTIONS
      -o fname (output file)
	Output file.

      -imx fname (input file)
	Input file.

      -map fname (row/col map file))
      -rmap fname (row map file)
      -cmap fname (column map file)
      -mapi fname (row/col map file (use inverse))
      -rmapi fname (row map fil (use inverse))
      -cmapi fname (column map fil (use inverse))
	Different ways to specify map files.

      -make-map (output map file name)
      -make-mapc (output map file name)
      -make-mapr (output map file name)
	Generate a map that maps the specified domain onto the appropriate canonical domain and write the map matrix to file.

      -cmul a (coefficient)
      -cshift b (translate)
	These  options	have  affect if neither a column map file nor column canonification is specified. If any of the first two options is used,
	column indices i are mapped to a*i+b.

      -rmul c (coefficient)
      -rshift d (translate)
	These options have affect if neither a row map file nor row canonification is specified.  If  any  of  the  first  two	options  is  used,
	indices i are mapped to c*i+d.

      -mul e (coefficient)
      -shift f (translate)
	If  a  map  file  is  specified for a given domain, neither a map file nor canonification is specified. If any of the first two options is
	used, the indices i will be mapped to e*i+f.

      -tab fname (read (and map) tab file)
	This option requires the -map option. mcxmap will output the mapped tab definition.

  EXAMPLES
      The matrix below has two canonical domains which are identical.  It denotes a map of the canonical domain onto itself, in which  node  0	is
      relabeled to 8, node 1 is relabeled to 5, et cetera.

      (mclheader
      mcltype matrix
      dimensions 12x12
      )
      (mclmatrix
      begin
      0  8  $
      1  5  $
      2  3  $
      3  2  $
      4  4  $
      5  6  $
      6  7  $
      7  9  $
      8  1  $
      9  10 $
      10 11 $
      11 0  $
      )

  AUTHOR
      Stijn van Dongen.

  SEE ALSO
      mcxio(5), mcx(1), mcxsubs(1), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

  mcxmap 12-068 						      8 Mar 2012							   mcxmap(1)
All times are GMT -4. The time now is 01:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy