LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-01-2004, 05:52 AM   #1
jesus_edu
LQ Newbie
 
Registered: Mar 2004
Location: Darmstadt, Germany
Distribution: Suse 9.0
Posts: 29

Rep: Reputation: 15
function


hello!
I've just installed a program, but for running it, I must write everytime the full path...
I'd like to write a function , for example :

function program() {
/home/user/program/program
}

But every time I quit the shell, I must write the function another time :-) how can I save the function? I'm using SuSe 9.0
thanks
 
Old 05-01-2004, 06:16 AM   #2
hfawzy
Member
 
Registered: Aug 2002
Location: Egypt
Distribution: Debian Sarge, Slackware 10.0
Posts: 163

Rep: Reputation: 30
You can add your function to the .bashrc file located in your home directory.
Instead of writing a function, you could have created a symbolic link (using the ln command) poining to the path of the program. You would have then placed this link in a directory that belongs to the $PATH enviroment variable (ex : /usr/bin or /usr/local/bin).

Hope that helps.
 
Old 05-01-2004, 06:36 AM   #3
jesus_edu
LQ Newbie
 
Registered: Mar 2004
Location: Darmstadt, Germany
Distribution: Suse 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
thanks for the information, that whas just what i needed ...first, i learned how to write functions that are always available, then i made the link that you told me and everything's okay ... thanks a lot
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling another function from a function using GTK geminigal Programming 4 07-11-2005 03:15 PM
what are the Hexadecimal function and ASCII function in Perl Bassam Programming 1 06-03-2004 01:44 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
Is the wait function is the same as the sleep function ? Linh Programming 3 04-28-2004 12:39 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration