From 036d4c47dd5a95424342f56259afb288423e8315 Mon Sep 17 00:00:00 2001 From: Phil Greenway Date: Sun, 6 Oct 2002 10:15:53 +0000 Subject: [PATCH] Coded by Sandor Vroemisse git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1398 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bin/whoami.c | 21 +++++++++++++++++++++ src/apps/bin/yes.c | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/apps/bin/whoami.c create mode 100644 src/apps/bin/yes.c diff --git a/src/apps/bin/whoami.c b/src/apps/bin/whoami.c new file mode 100644 index 0000000000..2210b49cea --- /dev/null +++ b/src/apps/bin/whoami.c @@ -0,0 +1,21 @@ +// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +// +// Copyright (c) 2002, OpenBeOS +// +// This software is part of the OpenBeOS distribution and is covered +// by the OpenBeOS license. +// +// +// File: whoami.c +// Author: Sandor Vroemisse (svroemisse@users.sf.net) +// Description: standard Unix whoami command +// +// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +#include +#include + +int main( int argc, char ** argv ) { + printf( "%s\n", getlogin() ); + return 0; +} diff --git a/src/apps/bin/yes.c b/src/apps/bin/yes.c new file mode 100644 index 0000000000..7481b75eee --- /dev/null +++ b/src/apps/bin/yes.c @@ -0,0 +1,21 @@ +// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +// +// Copyright (c) 2002, OpenBeOS +// +// This software is part of the OpenBeOS distribution and is covered +// by the OpenBeOS license. +// +// +// File: yes.c +// Author: Sandor Vroemisse (svroemisse@users.sf.net) +// Description: standard Unix yes command +// +// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +#include + +int main( int argc, char ** argv ) { + while(1 ) + printf( "y\n" ); + return 0; // Who knows, this might prevent warnings on a compiler or two +} \ No newline at end of file