C-Shell
A simple shell written in C.
Loading...
Searching...
No Matches
echo.c File Reference
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "../internal_commands.h"

Functions

int echo (int nargs, char **args)
 Write arguments to the standard output.
 

Variables

int opterr
 
int optind
 
int optopt
 
char * optarg
 

Detailed Description

Author
Swastik Pal
Version
0.1
Date
2022-11-05

Function Documentation

◆ echo()

int echo ( int nargs,
char ** args )

Write arguments to the standard output.

Display the ARGs, separated by a single space character and followed by a newline, on the standard output.

Options:

  • -c - separate arguments with commas
  • -n - no newline at the end
  • -l - format output as a list

Variable Documentation

◆ optarg

char* optarg
extern

◆ opterr

int opterr
extern

◆ optind

int optind

◆ optopt

int optopt