#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc,char *argv[])
{
char *cat="/bin/cat";
if(argc<2)
{
printf("Please type a file name.\n");
return 1;
}
char *command =malloc(strlen(cat) + strlen(argv[1]) + 2);
sprintf(command,"%s %s", cat,argv[1]);
system((command));
return 0;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter