MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / cmd_cat

Function cmd_cat

components/finsh/msh_file.c:301–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299MSH_CMD_EXPORT_ALIAS(cmd_mv, mv, Rename SOURCE to DEST.);
300
301static int cmd_cat(int argc, char **argv)
302{
303 int index;
304 extern void cat(const char *filename);
305
306 if (argc == 1)
307 {
308 rt_kprintf("Usage: cat [FILE]...\n");
309 rt_kprintf("Concatenate FILE(s)\n");
310 return 0;
311 }
312
313 for (index = 1; index < argc; index ++)
314 {
315 cat(argv[index]);
316 }
317
318 return 0;
319}
320MSH_CMD_EXPORT_ALIAS(cmd_cat, cat, Concatenate FILE(s));
321
322static void directory_delete_for_msh(const char *pathname, char f, char v)

Callers

nothing calls this directly

Calls 2

rt_kprintfFunction · 0.85
catFunction · 0.50

Tested by

no test coverage detected