Re: A little bash/perl programming help?



On Thu, 27 Sep 2007 20:26:11 +0000, Robert Newson wrote:

Ivan Marsh wrote:

On Thu, 27 Sep 2007 19:20:34 +0000, Robert Newson wrote:


Ivan Marsh wrote:


(For the record: No, it's not homework. I'm trying to write a script I
just lost when a very old server died.)

That's the best excuse yet...much better than the dog ate my
homework...[no, I'm training to be a teacher]

Time ate my RS/6000 F50 (poor thing).

Turns out the script I'm trying to write is even more complicated than I
thought.

It didn't just print 1234567890... it printed:

1 2 3
123456789012345678901234567890...

I know I've seen programs do this before so there must be some fairly
common logic to it, but I can't figure it out.

If you don't want a varying length header, then just print 2 lines, as in:

print 1 2 3
print 123456789012345678901234567890123...

Or am I missing something here?

If the file is greater than 80 characters it has to split the lines and
continue counting.

I'm trying to get the data off of the machine at this point just to see
how the script was written. But I have a feeling recovery is a lost
cause.

--
I told you this was going to happen.

.



Relevant Pages