Coded by Sandor Vroemisse

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Phil Greenway 2002-10-06 10:15:53 +00:00
parent 8353a17f9c
commit 036d4c47dd
2 changed files with 42 additions and 0 deletions

21
src/apps/bin/whoami.c Normal file
View File

@ -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 <stdio.h>
#include <unistd.h>
int main( int argc, char ** argv ) {
printf( "%s\n", getlogin() );
return 0;
}

21
src/apps/bin/yes.c Normal file
View File

@ -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 <stdio.h>
int main( int argc, char ** argv ) {
while(1 )
printf( "y\n" );
return 0; // Who knows, this might prevent warnings on a compiler or two
}