Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 01:31
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to pipe freshclam into urxvt via script?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Semme

Joined: 07 Aug 2011
Posts: 4052
Location: World_Hub

PostPosted: Sun 06 Jan 2013, 08:17    Post_subject:  How to pipe freshclam into urxvt via script?  

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:
#!/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..
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4345
Location: Gatineau (Qc), Canada

PostPosted: Sun 06 Jan 2013, 14:00    Post_subject:  

Greetings, Semme.

An urxvt script that works for any CLI is this:

Code:
#!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

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
Semme

Joined: 07 Aug 2011
Posts: 4052
Location: World_Hub

PostPosted: Sun 06 Jan 2013, 14:26    Post_subject:  

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:
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..
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4345
Location: Gatineau (Qc), Canada

PostPosted: Sun 06 Jan 2013, 14:41    Post_subject:  

My pleasure! Smile
_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0523s ][ Queries: 12 (0.0101s) ][ GZIP on ]