🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Regina Dawley Wed, 27 Sep 1989 14:58
awk
#1
Author: Regina Dawley
Date: Wed, 27 Sep 1989 14:58
15 lines
1102 bytes
Hello World,
As a novice to the Awk programming language, i'm having a
problem with my script.
First, i'm reading a data file using the getline function;
Secondly, i'm assigning the data line to $0;
Next, i'm selecting the first 5 lines from another data file
using the head command and redirecting the output to a file.
Next, i want to print $0 and append it to the file containing the 5
lines. This statement does not execute.
Does anyone have an answer?  The script follows.

                                       Thanks
                                      Regina Dawley
                                   autovon 8-444-7508
                                   215-952-7508
Re: awk
#2
Author: Regina Dawley
Date: Wed, 27 Sep 1989 15:12
9 lines
695 bytes
matchlines = 0
while ( getline < "temp.data" > 0) {
input[matchlines] = $0
system("head -5 < tale.data > tale.hdr")
print $0 >> tale.hdr
system("tail -29 < tale.data >> tale.hdr")
system("sprint tale.hdr")
matchlines++
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads