k99ja04 has asked for the wisdom of the Perl Monks concerning the following question:
Version
Release date:
Creation date: 2:17:09 AM EST Nov 19, 2004
Modified date: 2:17:09 AM EST Nov 19, 2004
Type: Nucleotide
Alphabet: NCBI2na(1)
No. of sequences (letters): 37,316 (33,115,935)
Longest sequence: 1542
Edit Alphabet: WUStLna(1)
Max. edits: 41
Total edits: 2693
I want a line in the middle that gives sequence count (in this example 37,316). I can gather the output with backticks and extract this number with some regular expression acrobatics, and store it in a variable easy enough. The problem is that everytime I execute the database info command, its output is automatically printed to the screen.
I don't want to see this output, I just want to run the script, have it gather the other program's output behind the scenes, and print out just the number. Is this even possible? I have tried a variety of ways of running the external program such as backticks, opening a pipe and using exec(), doing a manual fork() then exec(), and plain old system(). They all seem to work the same. Do I need to somehow filter my own STDOUT?
Thanks,
Jared
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: capture STDOUT without printing to screen
by bart (Canon) on Dec 01, 2004 at 15:53 UTC | |
by radiantmatrix (Parson) on Dec 01, 2004 at 17:27 UTC | |
|
Re: capture STDOUT without printing to screen
by jfroebe (Parson) on Dec 01, 2004 at 15:58 UTC | |
|
Re: capture STDOUT without printing to screen
by Fletch (Bishop) on Dec 01, 2004 at 17:02 UTC | |
|
Re: capture STDOUT without printing to screen
by hmerrill (Friar) on Dec 01, 2004 at 15:56 UTC | |
by k99ja04 (Initiate) on Dec 03, 2004 at 09:02 UTC | |
by hmerrill (Friar) on Dec 07, 2004 at 12:47 UTC |