02-15-2009
grep required data from two columns
hello,
I have output from a command and I need to filter some info out of that. I tried awk command but I can not grep what I am looking for:
Following is the output and I need to capture "disabled" for each volume from first column and report:
# vol status
Volume State Status Options
vol8 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
vol9 online raid_dp, flex nosnap=on, snapmirrored=on,
snapmirrored create_ucode=on,
read-only convert_ucode=on,
fs_size_fixed=on,
guarantee=volume(disabled)
vol4 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
vol5 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
vol6 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
vol7 online raid_dp, flex nosnap=on, snapmirrored=on,
snapmirrored create_ucode=on,
read-only convert_ucode=on,
fs_size_fixed=on,
guarantee=volume(disabled)
vol0 online raid_dp, flex root
vol1 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
vol2 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
vol10 online raid_dp, flex nosnap=on, snapmirrored=on,
snapmirrored create_ucode=on,
read-only convert_ucode=on,
fs_size_fixed=on,
guarantee=volume(disabled)
vol3 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on, guarantee=none,
read-only
vol11 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
logvol online raid_dp, flex nosnap=on, snapmirrored=on,
snapmirrored create_ucode=on,
read-only convert_ucode=on,
fs_size_fixed=on,
guarantee=volume(disabled)
vol12 online raid_dp, flex snapmirrored=on,
snapmirrored fs_size_fixed=on,
read-only guarantee=volume(disabled)
So I need to see the following as output:
vol8 guarantee=volume(disabled)
vol9 guarantee=volume(disabled)
vol4 guarantee=volume(disabled)
and so on ........
really appreciate your help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I need some help in grep command in a ksh script. Actually, i need to list all files having the file name like "BORD*.DAT" but exclude the files (from the list) having name like "BORD*mgt*.DAT". For that i used the following command:
ls | grep "BORD*.DAT" | grep -v "BORD*mgt*.DAT"
... (4 Replies)
Discussion started by: panzer
4 Replies
2. Shell Programming and Scripting
Hi Friends,
I have a log file as below
siteid = HYD
spc = 100
rset = RS_D_M
siteid = DEL
spc = 200
rset = RS_K_L
siteid = DEL2
spc = 210
rset = RS_D_M
Now I need a output like column wise as below.
siteid SPC rset
HYD 100 RS_D_M (2 Replies)
Discussion started by: suresh3566
2 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I have a file 1.txt which has the duplicate dns entries as shown:
Name: 000f9fbc6738.net.in|Addresses: 10.241.66.169, 10.84.2.222,212.241.66.170
Name: 001371e8ed3e.net.in|Addresses: 10.241.65.153, 10.84.1.101
Name: 00e06f5bd42a.net.in|Addresses: 10.72.19.218,... (6 Replies)
Discussion started by: imas
6 Replies
4. UNIX for Dummies Questions & Answers
Hello everyone!
I have a huge dataset looking like this:
nameX nameX 0 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 ...............
nameY nameY 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 .....
nameB nameB 0 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 .....
(can be several thousands of codes)
and I need... (8 Replies)
Discussion started by: kush
8 Replies
5. Shell Programming and Scripting
Hi,
File contains with TAB delimeter file,i want check the 2,3 are not null
test1@gmail.com 100 test
test2@gmail.com 101 test
test3@gmail.com test
test4@gmail.com 102
OUTPUT
test1@gmail.com 100 test
test2@gmail.com 101 test
Please help me with one single command in... (2 Replies)
Discussion started by: muralikri
2 Replies
6. Shell Programming and Scripting
Hello Experts,
File contains 10 columns with | delimeter. 1,3,4,5,7,9 columns are required columns means it should contains values.
i need those records, rest of it will contain or not contain data.
test1.txt:
a@a.com|a|b|c|d|e|f|g|h|i
|a|b|c|d|e|f|g|h|i
b@b.com|a||c|d|e|f|g|h|i... (7 Replies)
Discussion started by: muralikri
7 Replies
7. Shell Programming and Scripting
Hi All,
I need help for below scenario :
I have a principals.xml_24092012backup file :
cat principals.xml_24092012backup
</user>
<user username="eramire" password="2D393C01720749256303D204826A374D9AE9ABABBF8A">
<roleMapping rolename="VIEW_EVERYTHING"/>
</user>
... (2 Replies)
Discussion started by: kiran_j
2 Replies
8. Shell Programming and Scripting
Hi Guys,
Am in need of your help one more time on my real data.
I have a file which contains more than thousand lines of data
Live data shown for 4 iterations. We have more than thousand lines of data:-
--------------------------------------------------------------------------
... (4 Replies)
Discussion started by: rocky2013
4 Replies
9. UNIX for Beginners Questions & Answers
Hello All,
I am new to unix scripting. I need to read FROMINSTANCE, FROMFIELD from below XML code and need to write a script for
insert into SQ_EPIC values( "DID", "PROJECT_NAME")
Select DID, PROJECT_NAME from EPIC<CONNECTOR TOINSTANCETYPE="Source Qualifier" TOINSTANCE="SQ_EPIC" TOFIELD="DID"... (7 Replies)
Discussion started by: sekhar.lsb
7 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
i am trying to print required multiple columns dynamically from a fie.
But i am able to print only one column at a time.
i am new to shell script, please help me on this issue.
i am using below script
awk -v COLT=$1 '
NR==1 {
for (i=1; i<=NF; i++) {
... (2 Replies)
Discussion started by: balu1234
2 Replies
LEARN ABOUT DEBIAN
fssync-debug_online
FSSYNC-DEBUG_ONLINE(8) AFS Command Reference FSSYNC-DEBUG_ONLINE(8)
NAME
fssync-debug_online - Brings a volume online (FSYNC_VOL_ON opcode)
SYNOPSIS
fssync-debug online -volumeid <volume ID>
[-partition <exact partition name>]
[-reason <sync protocol reason code>]
[-programtype <program type code>]
[-help]
fssync-debug on -v <volume ID>
[-pa <exact partition name>]
[-r <sync protocol reason code>]
[-pr <program type code>]
[-h]
DESCRIPTION
The fssync-debug online command brings a volume online.
OPTIONS
-volumeid <volume ID>
Specifies the numeric volume ID. Volume names are not permitted.
-partition <exact partition name>
Specifies the exact partition name (e.g. /vicepa). Abbreviations are not permitted.
-reason <sync protocol reason code>
Specifies numeric sync protocol reason code. Available codes are listed in OpenAFS source file src/vol/fssync_inline.h. For
SYNC_REASON_NONE, use -reason 0.
-programtype <program type code>
Specifies program type code. Permitted values are fileServer, volumeUtility, salvager, salvageServer, volumeServer and volumeSalvager.
PRIVILEGE REQUIRED
The issuer must have write access to the file server. Usually, this means that the issuer must be the local superuser "root" on the file
server machine.
SEE ALSO
fssync-debug_attach(8), fssync-debug_detach(8), fssync-debug_callback(8), fssync-debug_offline(8), fssync-debug_leaveoff(8),
fssync-debug_error(8)
COPYRIGHT
Copyright 2010 Davor Ocelic <docelic@spinlocksolutions.com>
This documentation is covered by the IBM Public License Version 1.0. This man page was written by Davor Ocelic for OpenAFS, based on
documentation from Steven Jenkins, Tom Keiser and Simon Wilkinson.
OpenAFS 2012-03-26 FSSYNC-DEBUG_ONLINE(8)