Simple help in Linux command line
Hello.
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. |
% 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. |
Hey that worked!!!
You are the man!!! or iceman .. (:scratch: ) Working in biomed research I am not much of a comp wiz.. ;) Thanks for the help!!! |
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" gh $COMAND_STR I just tried X="-la /tmp" ls $X and it worked (ksh, sh, bash).... homey dont do c shell |
All times are GMT -5. The time now is 04:20 PM. |