Hi how do i grep only a part of the line from a file from all the lines.
file:
asdfgh 543212376 nag
lkjh abhilash 543757858
How do i grep and print only 543212376 and 543757858
Can i grep something like 543* and print only that. (3 Replies)
Hi,
In a file FILE, there is a line like this one
MOLECULE C2 H2
I want to extract "C2 H2". I can do it in two step in a script :
VARIABLE="`grep MOLECULE FILE`" # Assign "MOLECULE C2 H2"
VARIABLE=`echo ${VARIABLE/"MOLECULE "}` # Remove "MOLECULE ".
Then,
$echo $VARIABLE
gives
C2... (6 Replies)
How do I print only the values of the variables from set or env.
For example I have the lines
USER=USER
XYZ='text'
SHELL=/bin/bash
How do I print only the part after or starting from =
Let's say I have those lines in a list X
If I run
Y = echo $X | grep -o "=*$"
Y won't contain... (3 Replies)
Hi,
I have a problem to use grep in my script .
If I want to grep the file for example : PTWO9089.txt
The code below works .
grep ^PONE
But, I dont know on how to grep the file like this 9066PTWO.txt
I'll try to use this code :
grep PTWO^ ,but it doesn't work.
For your info, the... (4 Replies)
Hello All. I have an output file which contains the phrase "Total DFT Energy =" and then a number. This occurs many times in the output file, and what I want is to pipe the numbers (which are all different) to a file so I can plot them. How do I grep "Total DFT Energy =" and then get the numbers... (3 Replies)
Hi,
Suppose,
DBconnection=jdbc: oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.x)(PORT=YYYY))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=project_db1)))
This is a part of a file <filename> . I Need to get the value of SERVICE_NAME from this line…
The... (4 Replies)
Hi I just started on GNU Grep with regex and am finding it very challenging and need to ask for help already...
here is the problem, I have a page (MYFILE) which consists of the following....
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden"... (2 Replies)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
I need some help. I would like to read in a text file.
Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01.
Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies
LEARN ABOUT DEBIAN
mod-active
MOD-ACTIVE(8) InterNetNews Documentation MOD-ACTIVE(8)NAME
mod-active - Batch processing of newsgroups creation and removal commands
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 script must be run as the news user.
The input to mod-active can come either from one or more ctlinnd-command-file 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".
Please note that no syntax checking is performed on group names by mod-active.
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 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. Note that such scenarios
are very unlikely to happen.
HISTORY
Written by David C Lawrence <tale@isc.org> for InterNetNews. Converted to POD by Julien Elie.
SEE ALSO active(5), active.times(5), actsync(8), ctlinnd(8), docheckgroups(8), innd(8).
INN 2.5.3 2011-06-10 MOD-ACTIVE(8)