简体   繁体   中英

Easy way to find details about a macro in bash?

Say I have a macro like EXIT_SUCCESS or PTHREAD_MUTEX_INITIALIZER or EEXIST . It can be anything.

Is there an easy way to find information about them; which header file is required, what is its functionality / value and so on?

One option is to man the header file or function associated with it, but that is not an easy way. All opinions are welcome.

Best way is to use cscope, ctag or any similar software. You can also use grep with -r, -R flags.

grep -rnw "EXIT_SUCCESS" /usr/include/* . replace EXIT_SUCCESS with any words you wish.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM