[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: HELP - Run two commands at the same time, in the same window on the terminal



On Tuesday 2008 November 25 16:16, Jose Hernandez wrote:
> Hi, i would like to use macros (xnee) for answering my commands:
>
> For example (sh script): this is for encrypt a file with gpg
>
> gpg --e /directories/file -> This encrypt the file
> cnee --replay output /file.xnl -> This is for running the macro
>
> Then, gpg ask the name of the id, and file.xnl is a macro with the name
> recorded. I would like to run this at the same time, but with more
> commands and options.
>
> What could i do? Somebody know the response?

You can run any command in the "background" with '&' at the end of the line.  
For example, 'qgit --all --since="last week" < /dev/null > /dev/null 2>&1 &' 
to open a useful GUI view of your source tree while you continue to work on 
it in the terminal.

If you want to connect the output of one command to another command, you can 
use the pipe ('|') construct to do that.  For example 'dpkg -l "hp*" | 
awk "NR > 6 && \$1 == \"ii\" { print \$2 }" | xargs -r -- dpkg -L -- | grep 
aio' to figure where the scanner driver for your HP printer is.

The POSIX shell is very powerful, and bash and zsh add many features on top of 
that.  You may want to find some tutorial online (GIYF) for your chosen 
shell.

I don't know cnee or xnee so I can't be more specific.
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

Attachment: pgpQhaEWeQRWb.pgp
Description: PGP signature


Reply to: