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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-10-2005, 06:06 AM
|
#1
|
Member
Registered: Mar 2005
Location: berlin
Distribution: Redhat 9, Fedora 3
Posts: 70
Rep:
|
learned "aliases", what are "functions" in .bashrc?
I just learned how to set up an alias for a specific user
by adding the alias to this file:
/home/user1/.bashrc
However, I also saw in the file that there is a section comment
which says "aliases and functions". What are functions in this
sense, how do I create them and what do they do? Are these
somehow functions, e.g. written in perl or c that I can call from
the command line?
Thanks.
|
|
|
03-10-2005, 07:21 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
They are bash functions.
From info:bash -
Functions are declared using this syntax:
[ `function' ] NAME () { COMMAND-LIST; }
Type in 'info:bash' in the konqueror web browser, or the application launcher and go to the section 'basic shell features' for details. Unless you prefer 'info bash' in the console.
|
|
|
03-10-2005, 07:28 AM
|
#3
|
Member
Registered: Mar 2005
Location: berlin
Distribution: Redhat 9, Fedora 3
Posts: 70
Original Poster
Rep:
|
thanks...
what is the difference actually between "info bash" and "man bash"
they seem to have different information
i wasn't aware of "info ..."
is that new? I used unix back in 1992 the last time and we always used "man ..."
thanks.
|
|
|
03-15-2005, 04:24 AM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
info provides an indexed manual. Some of the man pages are not maintained while the info pages are. The man pages deal with the syntax and are more concise. 'info bash' provides a book full of information.
They are produced differently. The info pages are produced from docbook-utils. The source can be converted to different types of documents, such as info texinfo files, html pages or pdf documents. Man pages use Troff source files.
Another way to view man pages is to use the -Tdvi or -t or -Tps options. They will produce a .dvi or .ps printable document that you can view in kdvi or kghostview respectively. For some of the man pages, you may find it worthwhile to print them out. Such as coreutils and bash.
p.s.
On recent Mandrake (10.1 CE and up) the -T option is no longer available. I don't know about red hat or fedore core.
Last edited by jschiwal; 03-15-2005 at 04:25 AM.
|
|
|
All times are GMT -5. The time now is 03:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|