Fedora Linux Support Community & Resources Center
  #16  
Old 11th July 2009, 10:03 AM
gthill Offline
Registered User
 
Join Date: May 2005
Location: g-land, east java
Age: 50
Posts: 387
assumng you keep you script on a usb drive you could

#script lives here
/media/usddrive/my/script/path/program.sh

now create a link in your users bin path
cd ~/bin/
ln -s /media/usddrive/my/script/path/program.sh program

have a look at it
ls -l program
lrwxrwxrwx. 1 user user 40 2009-07-11 10:52 program -> /media/usddrive/my/script/path/program.sh

Now you have a link to the file in your bin directly which is executable and all you need to type is
$program

just make sure that /media/usddrive/my/script/path/program.sh is executable

or alternatively you could just use
sh /media/usddrive/my/script/path/program.sh

or in your .bashrc file you could put an alias
alias program='sh /media/usddrive/my/script/path/program.sh'

then all you need is to type
$program

Last edited by gthill; 11th July 2009 at 10:07 AM.
Reply With Quote
  #17  
Old 11th July 2009, 10:46 AM
pingpong Offline
Registered User
 
Join Date: Jul 2007
Posts: 51
Thank you. But I think it is still not like this. I can create any program and execute it directly without having to manually use script or the like for each program. Is there anything to do with changing the shell from bash shell to cshell? Your help is always very much appreciated. PP.
__________________
Where Am I ???
Reply With Quote
  #18  
Old 12th July 2009, 04:10 PM
pingpong Offline
Registered User
 
Join Date: Jul 2007
Posts: 51
I wouldn't imagine it is this difficult to sort out .
__________________
Where Am I ???
Reply With Quote
  #19  
Old 12th July 2009, 06:52 PM
gogalago Offline
Registered User
 
Join Date: Sep 2007
Location: Japan
Posts: 81
no its not.

just type /. before your command or script.
Reply With Quote
  #20  
Old 13th July 2009, 06:09 PM
pingpong Offline
Registered User
 
Join Date: Jul 2007
Posts: 51
Thats what I am doing. Anyway, thank you all for your help. I really appreciate. I will wait till my friend is back to ask him. Cheers.
__________________
Where Am I ???
Reply With Quote
  #21  
Old 15th July 2009, 09:54 AM
Min Offline
Registered User
 
Join Date: Jun 2009
Location: Melbourne
Posts: 246
can't you just add the path variable with "./" ? Again its really not recomended
__________________
Macbook aluminum 5,1
Snow Leopard, Constantine, Seven
Reply With Quote
  #22  
Old 23rd July 2009, 06:49 AM
pingpong Offline
Registered User
 
Join Date: Jul 2007
Posts: 51
Hi Min, I found out the reason. When I checked the $PATH I see that my friend put ./ in the variable field. How do I do it? Thank you.
__________________
Where Am I ???
Reply With Quote
  #23  
Old 23rd July 2009, 07:07 AM
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 65
Posts: 2,623
You don't. And, the next time you see your friend, chew him out for violating basic Linux/Unix security. I'd originally followed the above with instructions on how to create a shell script in his home directory that would log him out when he tried to change directories as an object lesson, but better sense prevailed. All I will say is that if you understand what you've been told above you can probably figure it out for yourself. If not, it's probably better that way, and I'm not going to put something here that could be used maliciously.

(Mind you, I'd have no hesitation doing it myself, but then, I'm a BOFH in good standing and know what I'm doing. I'm not putting instructions on how to do it on an open forum like this where some skript kiddie wannabe might see it...)
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #24  
Old 23rd July 2009, 10:04 AM
pingpong Offline
Registered User
 
Join Date: Jul 2007
Posts: 51
Ok, I understand it is dangerous. I also figured out how to put it in. Thanks for your sincere advice. Use With Care. This thread is officially solved. Thanks to all who have helped me and also gratitude for your patience. PP.
__________________
Where Am I ???
Reply With Quote
Reply

Tags
command, direct

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Direct Rendering Axiom119 Hardware & Laptops 2 15th June 2008 01:57 AM
Direct Rendering jbrowne Hardware & Laptops 6 1st March 2008 09:22 PM
No direct rendering anthony_de Hardware & Laptops 7 17th January 2007 04:05 AM
please direct me goldstar1 Servers & Networking 4 10th October 2006 09:36 PM
Direct Connect (dc++) on FC4 suv Using Fedora 6 5th September 2005 05:08 AM


Current GMT-time: 11:59 (Friday, 24-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Belford Roxo - Novodvinsk Photos - Kerava Travel Photos on Instagram