bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help!


From: Miguel Luis
Subject: Help!
Date: Sun, 30 Apr 2006 22:38:50 +0100
User-agent: Mail/News 1.5 (X11/20060309)

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:

address@hidden:~/Desktop$ bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
address@hidden:~/Desktop$



- I just ran my cesar's program like this:

address@hidden:~/Desktop$ echo "Hello World\n" | ./cesar 4

- and then my bash was:

address@hidden:·/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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]