0

I am working on a project that uses a script (blastn from NCBI's BLAST+ package) that, as far as I can tell, can only read input from a file. I'd like to be able to pass it a string in stdin and have it treat that as if it's the contents of a query file. I could do that by writing the string to a file then giving this script the name of a file but is there a different way to do it that I could try?

2

1 Answer 1

2

2 things come to mind:

  • many tools (but not all) treat the filename - as "read from stdin"

    seq 20 | paste - -
    
  • use a Process Substitution, that looks to the program like a filename

    rev <( echo "hello world" )
    
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.