Search Results

Search: Posts Made By: prodigy06
2,569
Posted By penchal_boddu
for this specific case , searching of FIBRE may...
for this specific case , searching of FIBRE may solve the issue.
When searching on assignment for multiple devices , there can be devices mapped to SCSI ports or Mainframe ports . This might work...
2,569
Posted By RudiC
awk '/FIBRE/ {print $(NF-2)}' inputfile
awk '/FIBRE/ {print $(NF-2)}' inputfile
2,569
Posted By pamu
you don't need grep and awk separately. try...
you don't need grep and awk separately.

try this..


awk '/FIBRE/{for(i=1;i<=NF;i++){if($i == "FIBRE"){print $(i-1)}}}' file
2,682
Posted By RudiC
That code is needless; pls show the output of...
That code is needless; pls show the output of symdg show $INS-${SNAP} | od -tx1

We can cheat and supply an empty $5 field: sed -r 's/(^.{73}) {3}/\1---/;s/(^.{64}) /\1-/' file|
awk 'BEGIN {print...
2,142
Posted By pamu
ohh sorry one typo mistake... try now... ...
ohh sorry one typo mistake...

try now...


awk '{if($0 ~ /Dev Config/){a=1}else if($0 ~ /VDEV/ && $1 ~ /^[0-9]/){if(! X[a]){X[a]=$1;a++;if(a > max){max=a}}else{X[a]=X[a]" "$1;a++}}}END{ ...
2,142
Posted By itkamaraj
for x in 1 2; do symdg show floras0-snap$x | awk ...
for x in 1 2; do symdg show floras0-snap$x | awk '{print $3,$4}'; done > input.txt
awk '/floras0/{fname="snap"substr($0,length,1)}/VDEV$/{print $1 >fname}' input.txt
paste snap*
2,142
Posted By elixir_sinari
With some assumptions, try this: awk...
With some assumptions, try this:
awk 'FNR==NR{if($4=="VDEV") a[++i]=$3;next}
$4=="VDEV"{print a[++j],$3}' <(symdg show floras0-snap1) <(symdg show floras0-snap2)
2,142
Posted By pamu
try this.. awk '{if($0 ~ /Dev...
try this..


awk '{if($0 ~ /Dev Config/){a=1}else if($0 ~ /VDEV/){if(! X[a]){X[a]=$1;a++;if(a > max){max=a}}else{X[a]=X[a]" "$1;a++}}}END{
> for(i=1;i<max;i++){print X[i]}}' file
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 06:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy