[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bash-bug
Subject:    Help!
From:       Miguel Luis <a35902 () alunos ! det ! ua ! pt>
Date:       2006-04-30 21:38:50
Message-ID: 44552E6A.1070200 () alunos ! det ! ua ! pt
[Download RAW message or body]

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:

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



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

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

- and then my bash was:

Lipps$[svph`r└≤┐0┼@└0│: /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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic