Sponsored Content
Full Discussion: UNIX macro....Im new!!
Top Forums UNIX for Dummies Questions & Answers UNIX macro....Im new!! Post 302902647 by Corona688 on Wednesday 21st of May 2014 12:48:31 PM
Old 05-21-2014
"macro" has no particular meaning to UNIX, though it might to some specific application in UNIX. By "macro" do you maybe mean "script"?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

VI Macro Problem

I'm having a problem with a macro i put in my .exrc file. Here's what I put: map #I ^[ ^ [ is control-v and the escape key. It places a # a the beginning of a line by simply hitting the # on the keyboard. Problem is, now when I hit "o" or "O" to move up or down a line, it places a # at... (1 Reply)
Discussion started by: Atama
1 Replies

2. HP-UX

USRSTACK macro

I'm upleveling code from 10.20 to 11.11....but I'm running into a problem in which the USRSTACK macro does not seem to be defined in 11.11. Has anybody else experienced this/fixed it/worked around it? Is there a different macro I should be using instead? Thanks for any info you can provide!! (1 Reply)
Discussion started by: jalburger
1 Replies

3. Programming

macro

Can i define a macro for a function of 10 LOC. (9 Replies)
Discussion started by: bankpro
9 Replies

4. Programming

Regarding #ident macro

Hi, In my application I have some number c files. In each of the file the following line will be the first statement. #ident "@(#) set.c 14.1.2.2 05/15/01 17:06:32" I would like to know what is the use of the above statement. Thanks Sarwan (1 Reply)
Discussion started by: sarwan
1 Replies

5. Programming

Make-question - redefine a macro, using another macro..?

I think there is no problem to use any macro in a new macro definishion, but I have a problem with that. I can not understand why? I have a *.mak file that inludes file with many definitions and rules. ############################################## include dstndflt.mak ... One of the... (2 Replies)
Discussion started by: alex_5161
2 Replies

6. Shell Programming and Scripting

Unix macro help

Hi, I just opened one old RH box and found number of "macros" in there, that how they called in how-to doc, let say you type <rx> and this does a lot of stuff. I can't figure out how it work, how I can edit/display these macros? Can anybody point to the right directions? I have some academic... (3 Replies)
Discussion started by: trento17
3 Replies

7. UNIX for Dummies Questions & Answers

F-key macro...

Hi everyone, What I am trying to do is assign a F-key a macro to save a file in vi and display said file in firefox. The details are as follows: I am using a Win 7 laptop with and ssh program to log into a unix system. What I am trying to do is figure out how to bring up the firefox... (1 Reply)
Discussion started by: csharp100
1 Replies

8. Shell Programming and Scripting

Invoke a script in UNIX using Excel Macro

Hi, I am using Send Keys to connect to UNIX server and invoke a script . Is there an alternate way to connect to UNIX server using Excel macro and invoke a UNIX Shell script? Anu (2 Replies)
Discussion started by: anandita.jha
2 Replies

9. UNIX for Dummies Questions & Answers

macro

Can I create a macro in UNIX? If so where do I find out how? (1 Reply)
Discussion started by: JD_Sal
1 Replies

10. Programming

Explanation of a macro

Can some body explain this part in a header file for me? #include <limits.h> #define BIGNUM unsigned long long typedef BIGNUM (*hash_t) (char *str); ......I have hard time for the second part: typedef BIGNUM (*hash_t) (char *str); First, I could not find the definition of hash_t, which... (1 Reply)
Discussion started by: yifangt
1 Replies
M4(1)							      General Commands Manual							     M4(1)

NAME
m4 - macro processor SYNOPSIS
m4 [ files ] DESCRIPTION
M4 is a macro processor intended as a front end for Ratfor, C, and other languages. Each of the argument files is processed in order; if there are no arguments, or if an argument is `-', the standard input is read. The processed text is written on the standard output. Macro calls have the form name(arg1,arg2, . . . , argn) The `(' must immediately follow the name of the macro. If a defined macro name is not followed by a `(', it is deemed to have no argu- ments. Leading unquoted blanks, tabs, and newlines are ignored while collecting arguments. Potential macro names consist of alphabetic letters, digits, and underscore `_', where the first character is not a digit. Left and right single quotes (`') are used to quote strings. The value of a quoted string is the string stripped of the quotes. When a macro name is recognized, its arguments are collected by searching for a matching right parenthesis. Macro evaluation proceeds nor- mally during the collection of the arguments, and any commas or right parentheses which happen to turn up within the value of a nested call are as effective as those in the original input text. After argument collection, the value of the macro is pushed back onto the input stream and rescanned. M4 makes available the following built-in macros. They may be redefined, but once this is done the original meaning is lost. Their values are null unless otherwise stated. define The second argument is installed as the value of the macro whose name is the first argument. Each occurrence of $n in the replacement text, where n is a digit, is replaced by the n-th argument. Argument 0 is the name of the macro; missing arguments are replaced by the null string. undefine removes the definition of the macro named in its argument. ifdef If the first argument is defined, the value is the second argument, otherwise the third. If there is no third argument, the value is null. The word unix is predefined on UNIX versions of m4. changequote Change quote characters to the first and second arguments. Changequote without arguments restores the original values (i.e., `'). divert M4 maintains 10 output streams, numbered 0-9. The final output is the concatenation of the streams in numerical order; initially stream 0 is the current stream. The divert macro changes the current output stream to its (digit-string) argument. Output diverted to a stream other than 0 through 9 is discarded. undivert causes immediate output of text from diversions named as arguments, or all diversions if no argument. Text may be undiverted into another diversion. Undiverting discards the diverted text. divnum returns the value of the current output stream. dnl reads and discards characters up to and including the next newline. ifelse has three or more arguments. If the first argument is the same string as the second, then the value is the third argument. If not, and if there are more than four arguments, the process is repeated with arguments 4, 5, 6 and 7. Otherwise, the value is either the fourth string, or, if it is not present, null. incr returns the value of its argument incremented by 1. The value of the argument is calculated by interpreting an initial digit- string as a decimal number. eval evaluates its argument as an arithmetic expression, using 32-bit arithmetic. Operators include +, -, *, /, %, ^ (exponentia- tion); relationals; parentheses. len returns the number of characters in its argument. index returns the position in its first argument where the second argument begins (zero origin), or -1 if the second argument does not occur. substr returns a substring of its first argument. The second argument is a zero origin number selecting the first character; the third argument indicates the length of the substring. A missing third argument is taken to be large enough to extend to the end of the first string. translit transliterates the characters in its first argument from the set given by the second argument to the set given by the third. No abbreviations are permitted. include returns the contents of the file named in the argument. sinclude is identical to include, except that it says nothing if the file is inaccessible. syscmd executes the UNIX command given in the first argument. No value is returned. maketemp fills in a string of XXXXX in its argument with the current process id. errprint prints its argument on the diagnostic output file. dumpdef prints current names and definitions, for the named items, or for all if no arguments are given. SEE ALSO
B. W. Kernighan and D. M. Ritchie, The M4 Macro Processor M4(1)
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy