NSLog(@"type a text:\n");
NSFileHandle *input = [NSFileHandle fileHandleWithStandardInput];
NSData *inputData = [input availableData];
NSString *str = [[NSString alloc] initWithData:inputData encoding:NSUTF8StringEncoding];
NSLog(@"Text: %@", str);