Register
It is currently Wed Oct 01, 2014 2:19 pm

Please help make these 2 functions elegant!


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Fri Apr 22, 2011 6:33 pm   

Joined: Fri Apr 22, 2011 6:29 pm
Posts: 1
Hi all,

I have a couple of lines in my .profile, but I'd like to publish them as an example for others and I think there's going to be a more elegant way to write them. My problem is sending the results of one function to another, I'm using a variable and it feels hackish.

Can you improve on these?


findF() { THEF=`find . -name $1`;export THEF; }
showF() { /usr/bin/gedit $THEF & }

Thanks for any suggestions!

Rick


Top
 Profile  
 PostPosted: Sat Apr 30, 2011 9:09 pm   

Joined: Mon May 31, 2010 7:40 pm
Posts: 25
So, Rick, what is it that your searching for and what are you searching?

I am pretty sure you can combine these into one function so, it is just that you want to search starting in your current path for a given string and display the sting in gedit?


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP