How to pipe freshclam into urxvt via script?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

How to pipe freshclam into urxvt via script?

#1 Post by Semme »

As the title suggests I want the script to first open urxvt, call freshclam, execute, then stay open till completion. As I'm not sure what I'm hoping for will even work, the library bit may be excluded for the time being.

Code: Select all

#!/bin/bash 
export LD_LIBRARY_PATH=$HOME/glibc-2.15:$LD_LIBRARY_PATH 
exec ???
Realize this needn't be limited to freshclam. An example using wget would be equally as valid.

Thanks for any help..

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Greetings, Semme.

An urxvt script that works for any CLI is this:

Code: Select all

#!bin/sh
# freshclam.sh
####
# export LD_LIBRARY_PATH=$HOME/glibc-2.15:$LD_LIBRARY_PATH
# Remove the number sign in front of the above line if need be.

urxvt -e freshclam
The "-e" tells urxvt to execute freshclam.
To keep urxvt opened until the CLI program has ended, the solution is simple : DO NOT add an ampersand ("&") at the end of the command line. (There are a few exceptions, but generally that works.)

The above script should open freshclam with its default parameters in the urxvt default window.

Enjoy!

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#3 Post by Semme »

Greetings Musher.

I see (and simpler than I thought). What I wasn't trying was an app that had some business remaining open, say..

Code: Select all

xterm -e wget http://ftp.nluug.nl/ftp/pub/os/Linux/distr/quirky/wary-5.3/wary-5.3.iso
Fact is I haven't swung over to Wary to proof the actual program.. a task I'll be addressing shortly..

Hopefully- I'll get the latest version running without the need for a rebuild.

Thanks :wink: again..

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#4 Post by musher0 »

My pleasure! :)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply