GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
Main Page
Related Pages
+
Data Structures
Data Structures
Class Hierarchy
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
z
+
Enumerations
a
c
d
e
h
l
m
n
o
p
r
s
t
v
y
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
echo.c
Go to the documentation of this file.
1
#include <string.h>
2
#include <
grass/gis.h
>
3
#include <stdio.h>
4
#include <stdlib.h>
5
6
/******************************************
7
* $GISBASE/etc/echo [-n] [-e] args
8
*
9
* echos its args to stdout
10
* suppressing the newline if -n specified
11
* prints to stderr instead if -e specified
12
*
13
* replaces the standard UNIX echo which
14
* varies from machine to machine
15
*******************************************/
16
17
int
main
(
int
argc,
char
*argv[])
18
{
19
int
i;
20
int
newline;
21
int
any;
22
FILE *stream = stdout;
23
24
newline = 1;
25
any = 0;
26
27
for
(i = 1; i < argc; i++)
28
if
(strcmp(argv[i],
"-n"
) == 0)
29
newline = 0;
30
else
if
(strcmp(argv[i],
"-e"
) == 0)
31
stream = stderr;
32
else
33
fprintf(stream,
"%s%s"
, any++ ?
" "
:
""
, argv[i]);
34
if
(any && newline)
35
fprintf(stream,
"\n"
);
36
37
exit(0);
38
}
main
int main(int argc, char *argv[])
Definition:
echo.c:17
gis.h
lib
init
echo.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13