Hi,
My awk program is failing. I figured out using command
od -c filename
that the last line of the file doesnt end with a new line character.
Mine is an automated process because of this data is missing.
How do i handle this?
I want to append new line character at the end of last... (2 Replies)
Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt.
and i am stuck.
list=`cat /u/Test/programs`;
psg "ServTest" | awk -v listawk=$list '{
cmd_name=($5 ~ /^/)? $9:$8
for(pgmname in listawk)
... (6 Replies)
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
I'm kinda stuck on this one, I have 7 files with 30.000 lines/file like this
050 0.023 0.504336
050 0.024 0.529521
050 0.025 0.538908
050 0.026 0.537035
I want to find the mean line by line of the third column from the files named like this:
Stat-f-1.dat .... Stat-f-7.dat
Stat-s-1.dat... (8 Replies)
Dear UNIX community,
I would like to to count characters from a specific row and have them displayed line-by-line.
I have a file called testAwk2.csv which contain the following data:
rabbit penguin goat
giraffe emu ostrich I would like to count in the middle row individually... (4 Replies)
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code:
awk... (34 Replies)
I have a file and when I match the word "initiators" in the first column I need to be able to print the rest of the columns in that row. This is fine for the most part but on occasion the "initiators" line gets wrapped to the next line. Here is a sample of the file.
caw-enabled ... (3 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT REDHAT
mod-active
MOD-ACTIVE(8) System Manager's Manual MOD-ACTIVE(8)NAME
mod-active - batch processing of ctlinnd newgroup/rmgroup/changegroup
SYNOPSIS
mod-active [ ctlinnd_command_file ]
DESCRIPTION
mod-active is a perl script that updates the active file based on its input lines of ctlinnd newgroup, rmgroup and changegroup commands.
It pauses the server briefly while the existing active file is read and rewritten, which not only keeps innd from updating the active file
but also locks against other instances of mod-active.
The input to mod-active can come either from one or more files named on the command line, or from the standard input. Typically its input
is the output from the docheckgroups or actsync commands. Every line which contains the string "ctlinnd newgroup", "ctlinnd rmgroup" or
"ctlinnd changegroup", optionally preceded by whitespace and/or the path to ctlinnd, is noted for the update. Redundant commands, such as
a newgroup directive for a group that already exists, are silently ignored. All other lines in the input are also silently ignored.
After the new active file has been generated, the existing one is renamed to active.old and the new one is moved into place. The script
then displays the differences between the two files.
Any groups that were added to the active file are also added to the active.times file with the string "checkgroups-update".
BUGS
Though innd is paused while mod-active works, it is not inconceivable that there could be a conflict if something else tries to update the
active file during the relatively short time that mod-active is working. The two most realistic ways I can think of for this to happen are
either by an administrator concurrently doing a manual ctlinnd command, or by innd receiving a control message, then mod-active pausing the
server, then the control message handler script that innd forked running its own ctlinnd command while mod-active is working. I've been
using mod-active regularly for several years, though, and never had either problem.
HISTORY
Written by David C Lawrence <tale@isc.org>.
SEE ALSO active(5), actsync(8), ctlinnd(8), innd(8).
MOD-ACTIVE(8)