LinuxQuestions.org
Help answer threads with 0 replies.
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 07-04-2012, 09:29 PM   #1
diamond_D
Member
 
Registered: Jul 2005
Posts: 51

Rep: Reputation: 0
functions and "declare -f"


Been using Linux for over a year and finally getting around to digging deeper into learning bash.

I've been reading about listing functions using the "declare -f" AND "declare -F" commands.

Let's say I type "declare -F" and get a long listing of defined functions. Example:
Code:
declare -f _ImageMagick
declare -f __expand_tilde_by_ref
declare -f __get_cword_at_cursor_by_ref
declare -f __grub_dir
declare -f __grub_get_last_option
declare -f __grub_get_options_from_help
plus many more....

My question is where are all of these functions defined?
 
Old 07-04-2012, 09:56 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Well, they'd be being set during the login process, so I'd start at the 'top' ie /etc/profile, and go on from there.
 
1 members found this post helpful.
  


Reply


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
[SOLVED] What happened to "round" and "pow" functions? worsel Programming 4 03-07-2011 10:46 AM
"GRUB _" when booting, nothing but "ctrl+alt+del" functions rabidpencil Linux - Newbie 15 08-08-2006 11:20 AM
C/C++ functions similar to BASH's "cp", "mv", "mkdir", etc? kornerr Programming 10 04-23-2006 10:48 AM
learned "aliases", what are "functions" in .bashrc? learnfast Linux - Newbie 3 03-15-2005 05:24 AM
"ifcfg-ethx" and "network-functions" files peok Linux - Networking 12 08-13-2003 07:06 PM


All times are GMT -5. The time now is 01:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration