Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-29-2003, 01:02 PM   #1
LQ Newbie
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
Simple help in Linux command line

I have a simple question. I would like to pipe a command to a program called gh from the linux prompt.

If I make a text file and write the content of commands for program gh then I cat it and pipe to the program it works. i.e.

% cat <txtfile.txt> | gh

This works.

But I would like to do this without having to make the txtfile.txt with command line for gh.

I tried something like

% "load chromosome.txt" | gh

in this case "load chromosome.txt" would be a command like for gh. This method did not work.

Is there anyway to do this?

Thanks in advance.
Old 09-29-2003, 01:13 PM   #2
Senior Member
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
% echo "load chromosome.txt" | gh

this pipes the string load chromosome.txt to gh.
Not sure if it'll work though, depends on the program.
Old 09-29-2003, 01:16 PM   #3
LQ Newbie
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Hey that worked!!!

You are the man!!! or iceman .. ( )

Working in biomed research I am not much of a comp wiz..

Thanks for the help!!!
Old 09-30-2003, 10:21 PM   #4
Registered: May 2003
Location: philadelhpia pa
Posts: 92

Rep: Reputation: 15
If i understand your question:
pipe, just redirects stdin....
the commands are read in as arguments, PROIR to stdin, reading the pipe.....

you might try
COMAND_STR=" -a -b -c -ffilename"

I just tried
X="-la /tmp"
ls $X
and it worked

(ksh, sh, bash).... homey dont do c shell


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to use command line with Linux ywergs Fedora 7 10-01-2005 09:56 PM
Simple / quick GUI on the command line ? michael_util Programming 3 01-05-2005 05:08 PM
Command Line On Linux??? unwrittenlaw Linux - Newbie 7 11-25-2003 12:59 AM
booting linux in simple command line tombomb300 Linux - Newbie 1 10-18-2003 01:49 PM
Command Line Linux Fusion07 Linux - Newbie 6 07-03-2002 12:47 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration