Search Results

Search: Posts Made By: mgessner
2,513
Posted By mgessner
I'd recommend searching for a good book on basic...
I'd recommend searching for a good book on basic UNIX commands. It's been so long since I had a UNIX class that I'm sure newer and better ones exist than when I was in school.

Try 'man diff' or...
Forum: AIX 10-15-2009
9,651
Posted By mgessner
It depends on the shell, AFAIK. You could...
It depends on the shell, AFAIK.

You could look in ~user/.history if it's been saved. I know that works for [t]csh, and I think bash does the same thing. Not sure of the other shells.
1,778
Posted By mgessner
Simplest thing I could figure out is: awk...
Simplest thing I could figure out is:

awk -F'|' '{print $2 "[" $5}' | awk -F'[' '{print $1 $3}' | awk -F']' '{ print $1}'
1,778
Posted By mgessner
dr. house: The OP wanted them on the same...
dr. house:

The OP wanted them on the same output.

To the OP:

You could do it in two steps and then merge the two files together.
Forum: Programming 07-24-2009
1,949
Posted By mgessner
It's obvious you are not a "real c programmer"...
It's obvious you are not a "real c programmer" and your attempt to goad us into sifting through this putrid mess is a poor one.

Get a book on C (K&R 2ed is good, Deitel & Deitel How to Program C...
Forum: Programming 07-24-2009
3,466
Posted By mgessner
There's actually a lot of it on the web. I...
There's actually a lot of it on the web.
I recently wrote an SMS handler for a GSM system, and the only bad part about it is the way you send the SMS (the > prompt is stupid).
8,335
Posted By mgessner
"Unix" is a wide and varied term. Which...
"Unix" is a wide and varied term.

Which particular OS/kernel are you using?

Vague information is as useless as no information.
6,434
Posted By mgessner
Your post is useless because there's no code to...
Your post is useless because there's no code to debug. None of us here have a crystal ball. Try putting some code up so people can look at it.

How did you expect us to be able to provide insight...
Forum: Programming 06-30-2009
3,708
Posted By mgessner
You set pp = head, but you never set head to...
You set pp = head, but you never set head to anything in your example.
5,137
Posted By mgessner
Well, you could devise a test pretty simply. ...
Well, you could devise a test pretty simply.

Create the FIFO w/ mkfifo. Create two processes, a writer and a reader.

Open the FIFO for write, which will block because there's no reader. When...
Forum: Programming 06-30-2009
3,708
Posted By mgessner
This is a problem: Obj *pp, *head; ... pp =...
This is a problem:
Obj *pp, *head;
...
pp = head;

/* other stuff involving pp, which is wrong because pp was set to an unknown value. */


head was never initialized. You must always...
Forum: Programming 06-29-2009
3,708
Posted By mgessner
Here's the problem: the pointers that malloc()...
Here's the problem: the pointers that malloc() returns are local to the address space of the process that called malloc(). Those values won't mean anything in the context of another process. Hence...
Forum: Programming 06-29-2009
7,235
Posted By mgessner
Because pid's differ widely across systems, the...
Because pid's differ widely across systems, the only thing you can really do (aside from changing printf() and adding a new class of object) is to cast intelligently:

printf ("pid = %lu\n",...
83,355
Posted By mgessner
When is the drawing supposed to take place? My...
When is the drawing supposed to take place? My system says it was supposed to take place on the 25th (26th Neo's time). There was no notification that the drawing had taken place. I still have a...
Forum: Programming 06-25-2009
13,996
Posted By mgessner
I'm nit-picking, but it isn't always the case...
I'm nit-picking, but it isn't always the case that sizeof is compile-time.

C99 allows sizeof to be runtime for VLA's.

---------- Post updated at 09:57 AM ---------- Previous update was at 09:56...
Forum: Programming 06-25-2009
7,308
Posted By mgessner
scanf is generally considered unsafe, as is...
scanf is generally considered unsafe, as is fscanf for similar reasons.

You're much better off learning how to use fgets and sscanf to do your work.

fscanf will continue to read %d from your...
8,376
Posted By mgessner
This looks to me like you found a stub that's...
This looks to me like you found a stub that's intended for someone to fill in for a specific system, given that no matter what you do to call it, it will return -1 and set errno. That said, I'm not...
5,042
Posted By mgessner
There are mailing lists which will give you much...
There are mailing lists which will give you much better targeted feedback than this one.

irc.freenode.net has #u-boot and irc.oftc.net has #kernelnewbies. There also the mailing list for the...
83,355
Posted By mgessner
Right now it says: Lotto! 310,600 Bits...
Right now it says:

Lotto! 310,600 Bits Jackpot
Drawing Date 06-25-09

Also, how about an option to be able to purchase more than one lottery ticket at a time? Say, maybe, max 5 or 10 at a...
83,355
Posted By mgessner
Lottery
The lottery drawing date still says 6-18-2009... I'm pretty sure that date has passed :)

When is the next one?
Forum: Fedora 06-13-2009
4,066
Posted By mgessner
/proc interface?
My linux installation has /usr/include/ieee1284.h

Functions include ieee1284_open, _close, _read_data, _write_data, _wait_data, etc.

YMMV

HTH
Forum: Programming 06-12-2009
9,785
Posted By mgessner
Before the close() happens, his biggest problem...
Before the close() happens, his biggest problem is his syntax:

if (fRead =open (argv[1], O_RDONLY) ==-1)

is completely wrong, and he's done it in several places.

== has higher precedence...
Forum: Programming 06-05-2009
4,866
Posted By mgessner
I think your approach using alarm and checking...
I think your approach using alarm and checking the return value of read makes sense. You should get back EINTR because the alarm signal handler went off.

Also, have you considered using select...
Forum: Programming 06-05-2009
8,345
Posted By mgessner
There are 3 floating point types in C, as of C99:...
There are 3 floating point types in C, as of C99:

float
double
long double

There are minimum sizes for these. The size for float on many machines is 32 bits, and for double 64 bits. On one...
1,862
Posted By mgessner
If you are the owner of the process, I would...
If you are the owner of the process, I would think that kill -STOP <pid> would temporarily stop the process, and kill -CONT <pid> would make it continue.

If you are not the owner of the process,...
Showing results 1 to 25 of 50

 
All times are GMT -4. The time now is 02:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy