Hi
i need a help for making a script whch can print next line if it matches a particular word
like file1 have
ename Mohan
eid 2008
ename Shyam
eid 345
if scipt got Mohan it will print next line (eid 2008)
pls help me .......:) (2 Replies)
Hi All,
I would like my code to be able to print out the whole line if 1st field has a dot in the number. Sample input and expected output given below.
My AWK code is below but it can;t work, can any expert help me ?
Thanks in advance.
{if ($1 ~ /*\.*/) { print $0 }}
Input:
... (2 Replies)
Hi all,
I got several lines line this
a b c d e 1 e
a 1 c d e 3 f
a b c 1 e 8 h
a b c d e 1 w
a 1 c d e 2 w
a b c d e 1 t
a b c d e 7 4
How can I print the line if 1 is the field one before the last field?
Basicly this 2 field ?
a b c d e 1 e
a b c d e 1 t
The file I got is... (7 Replies)
Hi Folks!
im printing all lines where the characters in position 270-271 match 33|H1|HA|KA|26 so i came up with this
#!/bin/bash
array=(33 H1 HA KA 26 )
for i in "${array}"
do
#echo $i
awk '{ if (substr($0,270,2)~'/$i/') print; }' $1 >> $1.temp
done
It works fine . but... (2 Replies)
I'm using sh on hp-ux and want to find / print a line that matches 132.101- and the next line, too. grep -A isn't supported on hp-ux, so I'm trying awk and sed.
The code below works but only prints the first occurence. I need all matches from the file.
awk... (2 Replies)
Good day,
I have a list of regular expressions in file1. For each match in file2, print the containing line and the line after.
file1:
file2:
Output:
I can match a regex and print the line and line after
awk '{lines = $0} /Macrosiphum_rosae/ {print lines ; print lines } '
... (1 Reply)
Hi,
I could only find examples to print line before/after a match, but I'd need to print line after two separate lines matching.
E.g.: From the below log entry, I would need to print out the 1234. This is from a huge log file, that has a lot of entries with "CLIENT" and "No" entries (+ other... (3 Replies)
Hi
I want to extend following command so that on the basis of "Branch: ****" on the third line I can grep and print name of the file on the first line.
cat .labellog.emd | grep DA2458A7962276A7E040E50A0DC06459 | cut -d " " -f2 | grep -v branch_name | xargs -I file <command to describe> file
... (1 Reply)
Der colleagues,
4 days I am trying to solve my issue and no success..
Maybe you can give me a clue how to achieve what I need..
So I have two files.
file1 example:
1_column1.1 1_column2.1 aaa 1_column4.1
1_column1.2 1_column2.2 ttt 1_column4.2
1_column1.3 1_column2.3 ... (10 Replies)
Discussion started by: nypreH
10 Replies
LEARN ABOUT SUSE
ocf_heartbeat_iscsitarget
OCF_HEARTBEAT_ISCSIT(7) OCF resource agents OCF_HEARTBEAT_ISCSIT(7)NAME
ocf_heartbeat_iSCSITarget - iSCSI target export agent
SYNOPSIS
iSCSITarget [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
Manages iSCSI targets. An iSCSI target is a collection of SCSI Logical Units (LUs) exported via a daemon that speaks the iSCSI protocol.
SUPPORTED PARAMETERS
implementation
The iSCSI target daemon implementation. Must be one of "iet", "tgt", or "lio". If unspecified, an implementation is selected based on
the availability of management utilities, with "iet" being tried first, then "tgt", then "lio". (optional, string, no default)
iqn
The target iSCSI Qualified Name (IQN). Should follow the conventional "iqn.yyyy-mm.<reversed domain name>[:identifier]" syntax.
(required, string, no default)
tid
The iSCSI target ID. Required for tgt. (optional, integer, no default)
portals
iSCSI network portal addresses. Not supported by all implementations. If unset, the default is to create one portal that listens on .
(optional, string, default 0.0.0.0:3260)
allowed_initiators
Allowed initiators. A space-separated list of initiators allowed to connect to this target. Initiators may be listed in any syntax the
target implementation allows. If this parameter is empty or not set, access to this target will be allowed from any initiator.
(optional, string, no default)
incoming_username
A username used for incoming initiator authentication. If unspecified, allowed initiators will be able to log in without
authentication. (optional, string, no default)
incoming_password
A password used for incoming initiator authentication. (optional, string, no default)
additional_parameters
Additional target parameters. A space-separated list of "name=value" pairs which will be passed through to the iSCSI daemon's
management interface. The supported parameters are implementation dependent. Neither the name nor the value may contain whitespace.
(optional, string, no default)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 10.
stop
Stops the resource. Suggested minimum timeout: 10.
monitor
Performs a detailed status check. Suggested minimum timeout: 10. Suggested interval: 10.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 10.
EXAMPLE
The following is an example configuration for a iSCSITarget resource using the crm(8) shell:
primitive example_iSCSITarget ocf:heartbeat:iSCSITarget
params
iqn=string
op monitor timeout="10" interval="10" depth="0"
SEE ALSO
http://www.linux-ha.org/wiki/iSCSITarget_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_ISCSIT(7)