Sponsored Content
Full Discussion: shell problem
Top Forums Shell Programming and Scripting shell problem Post 302247112 by dark_knight on Wednesday 15th of October 2008 02:58:58 AM
Old 10-15-2008
Question shell problem

Hello!
Can you please help me on a lab at school:
I have to to write a shell program which reads all .C files from the current directory and prints for each file how many '#define' directives it has and for each macro defined how many times is it used in that file.

Can you suggest how can i write this program?
Any indication would be much appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shell problem

&& set -x && echo "enter tablespace_end_backup" >&2 Can you tell me what's mean above? thanx (1 Reply)
Discussion started by: Lee
1 Replies

2. UNIX for Dummies Questions & Answers

Shell Problem.

Hello and Good day to all. Im having a problem here and would like to know if there is any solution that could overcome my problem. I have changed from bash to csh (c-shell) yesterday on my Linux 7.2. When i do $echo $SHELL i can see the output /bin/csh which means ihave succesfully landed on... (4 Replies)
Discussion started by: ###1tomato
4 Replies

3. UNIX for Advanced & Expert Users

Shell Problem

Dear Members; I changed ,by mistake ,the root shell in /etc/passwd and logged out. Thereafter, I can no more have a prompt when trynig to log in as root. How to solve this pb ? Regards :confused: (8 Replies)
Discussion started by: oss
8 Replies

4. UNIX for Dummies Questions & Answers

shell problem

What are the different type of shell available in UNIX and how to change the shell? just this 2 question pls help mi (4 Replies)
Discussion started by: yeah016
4 Replies

5. Shell Programming and Scripting

Problem in shell

hi, can any one tell a solution for the following : I want to append 10 spaces and a string say "ok" to 12 digit number which is stored in a varialbe & display using shell script. (1 Reply)
Discussion started by: Sandeep Kale
1 Replies

6. Shell Programming and Scripting

Shell Problem

Hi all, until yesturday grep command was running in KSH .... I was executing this command ls -l | grep *.sh But today its not working at all ... Should I check any of the setting ... I am not getting whats the problem ... I have relogged to unix box but it didn't... (14 Replies)
Discussion started by: dhananjayk
14 Replies

7. Shell Programming and Scripting

problem with if in shell

Hi, My sheel script has below statement: if; then When I run iam getting the below error: -bash: syntax error near unexpected token `then' What is wrong with that statement: Plz help me. (2 Replies)
Discussion started by: pradeep_script
2 Replies

8. Shell Programming and Scripting

Problem in shell script

hi...i create a script which reads data from file and compare that the data which is entered by me through keyboard...i can easily read first two contents of file..i am facing the problem to read other contents.. structure of my file is username:password:username1:password1.......and so on ... (1 Reply)
Discussion started by: shubhig15
1 Replies

9. Shell Programming and Scripting

shell problem

problem: I give the source of a c program.. is required to indicate how many times is called each function defined in the program and line number there is a call. let's say i have lab2.c: float dist(int *a,int *b,int n){ int i=0; double d=0; for (i=1;i<=n;i++){ d+=pow((a-b),2); }... (4 Replies)
Discussion started by: sherpeledenis
4 Replies

10. UNIX for Dummies Questions & Answers

shell problem

this picture for print You didn't do the question. Go back. if $1 = 0 but until now it give me this message what i should be do ? http://img717.imageshack.us/img717/6137/eeevb.jpg (2 Replies)
Discussion started by: NeeZaaR
2 Replies
stdsyms(5)							File Formats Manual							stdsyms(5)

NAME
stdsyms - description of named defines and other specifications for namespace from HP-UX header files DESCRIPTION
is a description of "named defines" and other specifications that must be set by the application to obtain the appropriate namespace from the HP-UX header files. HP-UX header files are organized in a manner that allows for only a subset of the symbols available in that header file to be visible to an application that conforms to a specific standard. The ANSI-C, POSIX.1, POSIX.2, XPG4 and subsequent enhanced versions of ANSI-C/POSIX/XPG each reserve a certain set of symbols for that standard's namespace. In addition, the HP-UX implementation of XPG3 and the "OSF AES/OS" provides for a clean namespace although this is not a specific requirement of those standards. The following rules apply in determining what symbols are reserved for any standard. These symbols are reserved for the standard and for use by the implementation, and must be either avoided altogether, or used exactly as defined by the specified standard. o All symbols defined by the desired standard are reserved. Refer to the appropriate standards documentation for a complete list of reserved symbols. o All symbols beginning with an underscore followed by another underscore or an uppercase letter are reserved for the implementation. o All external identifiers beginning with an underscore are reserved for the implementation. The following is a list of feature test macros which must be defined to obtain the appropriate namespace from the header files. This symbol is automatically defined by the ANSI-C preprocessor and is automatically defined when specifying an ANSI-C compile Using the strict ANSI option requests a pure ANSI-C namespace, which is the smallest subset of the HP-UX namespace available. The option also enables the inclusion of ANSI-C-style function prototypes for increased type checking. Note that the default namespace when using the option is the ANSI-C namespace; therefore a broader namespace must be requested if it is desired. This symbol is automatically defined by the ANSI-C preprocessor on some implementations. If defined, it indicates the version of the standard it is complying with. As documented in the IEEE POSIX.1 standard, the programmer is required to define the feature test macro to obtain the POSIX.1 namespace and POSIX.1 functionality. This feature test macro can be defined, either by using compiler options or by using directives in the source files before any directives. Note that the default POSIX namespace is the POSIX.1-1990 namespace. It is necessary to define the feature test macro in addition to the macro in order to obtain the POSIX.1-1988 namespace. As documented in the IEEE POSIX.2 standard, the programmer is required to define the feature test macro with a value of 2 to obtain the POSIX.1 and POSIX.2 namespaces and functionality. This feature test macro can be defined, either by using compiler options or by using directives in the source files before any directives. As documented in the X/Open Portability Guide the programmer is required to define the feature test macro to obtain X/Open functionality. This feature test macro can be defined, either by using compiler options or by using directives in the source files before any directives. Although XPG3 does not specify any namespace pollution rules, XPG4 and its subsequent versions have instituted such rules. Therefore, the HP-UX operating system provides clean namespaces whenever is defined. The current default X/Open namespace is that corresponding to XPG4. Broader namespace can be requested by setting to a value as specified by the standard document. As documented in the XPG, the programmer is required to define the feature test macro to obtain namespace and functionality. This feature test macro can be defined either by using com- piler option or by using directives in the source files before any directives. As documented in the "OSF AES/OS" standard, the programmer is required to define the feature test macro to obtain OSF functionality. This feature test macro can be defined, either by using compiler options or by using directives in the source files before any directives. Although the AES does not specify any namespace pollution rules, the other standards have instituted such rules. Therefore HP-UX provides a clean names- pace whenever is defined. Use of is strongly discouraged as this functionality will be removed in a future release of HP-UX. The programmer can define the feature test macro to obtain the HP-UX namespace and complete HP-UX functionality. Note that the HP-UX namespace is currently a superset of all of the above mentioned namespaces. When using the compiler with default options or the compiler with compatibility- mode options command without the option), the HP-UX namespace is provided by default (see cc(1)). The programmer must request one of the other namespaces as described above to obtain the appropriate subset of the HP-UX namespace. When using the strict ANSI-C- mode compiler the programmer must specifically request a broader namespace. The feature test macro can be defined, either by using compiler options or by using directives in the source files before any direc- tives. The following is a list of miscellaneous feature test macros that provide various additional features. This symbol is automatically defined by the HP C++ compiler. Defining this macro enables the C++ function prototypes in system header files. The default namespace for HP C++ is the ANSI-C namespace. To obtain another namespace define the appropriate feature test macro. HP C++ uses the ANSI-C preprocessor by default. To get the compatibility mode preprocessor, use the option of the command (see cc(1)). The compatibility mode preprocessor uses the HP-UX namespace This feature test macro should be defined when the namespace is required. It should be used in conjunction with the macro if the default namespace is not desired. This macro is defined automatically whenever or is requested. The feature test macro is provided so that the programmer can obtain the XPG3 namespace, since it differs slightly from the namespace. In order to obtain the XPG3 namespace, the programmer must define both the and feature test macros. The and feature test macros can be defined, either by using compiler options or by using directives in the source files before any directives. Use of this macro is strongly discouraged as this functionality will be removed in a future release of HP-UX. The feature test macro is defined automatically if the programmer has requested the XPG4 namespace (that is, defined but not some other conflicting namespace such as The macro can be defined when using the compatibility mode compiler to obtain SVID2 function return types in the HP-UX namespace. The default return types of many functions have since been changed in the HP-UX operating system to align with the ANSI-C, POSIX, X/Open, and OSF standards. Use of this macro is strongly discouraged as this functionality will be removed in a future release of HP-UX. The SVID3 macro can be defined to obtain SVID3 function prototypes. The compiler flag, needs to be defined to indicate that an application is written to meet SVID3 requirements. At the time the func- tion prototypes were introduced in ANSI C, the functions exposed by this flag were only defined in SVID3. SEE ALSO
cc(1), cpp(1), pathconf(2), sysconf(2), standards(5). stdsyms(5)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy