Hello, I started with linux for a year, so I think I still a beginner..
(Sorry if what I am about to report is nothing that should be sent to
this email)
- I'm Using Ubuntu Dapper Drake.
- My bash version:
[EMAIL PROTECTED]:~/Desktop$ bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
[EMAIL PROTECTED]:~/Desktop$
- I just ran my cesar's program like this:
[EMAIL PROTECTED]:~/Desktop$ echo "Hello World\n" | ./cesar 4
- and then my bash was:
[EMAIL PROTECTED]:·/D␊⎽┐├⎺⎻$
-----------------------------------------------------------------------------------------------
"cesar" code:
#include <stdio.h>
#include <stdlib.h>
int
main ( int argc, char ** argv )
{
int x, c;
if (argc != 2) exit ( 1 );
if (sscanf ( argv[1], "%d", &x ) != 1) exit ( 1 );
if (x < 0) x = -((-x) % 256);
while ((c = getchar ()) != EOF) {
putchar ( (c + x + 256) % 256 );
}
return 0;
}
-----------------------------------------------------------------------------------
Best regards,
Miguel Luis.
Portugal - Azores
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash