Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 15

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() {

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
Old 05-01-2004, 07:16 AM   #2
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, 07:36 AM   #3
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:15 PM
what are the Hexadecimal function and ASCII function in Perl Bassam Programming 1 06-03-2004 02:44 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 02:31 PM
Is the wait function is the same as the sleep function ? Linh Programming 3 04-28-2004 01:39 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 01:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:57 PM.

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