Following awk
code may help you in same.
awk 'FNR==NR{a[$0];next} ($0 in a){++c[$0]} END{for(i in c){if(c[i]==3){print i,c[i]+1}}}' Input_file1 Input_file2 Input_file3 Input_file4
Output will be as follows.
/dev/dev_sg2 4
/dev/dev_sg3 4
EDIT: In case you don't want to have the count of the lines and simply want to print the lines which come in all 4 Input_files then following will do the trick:
awk 'FNR==NR{a[$0];next} ($0 in a){++c[$0]} END{for(i in c){if(c[i]==3){print i}}}' Input_file1 Input_file2 Input_file3 Input_file4
EDIT2: Adding explanation for code too now.
awk '
FNR==NR{ ##FNR==NR condition will be TRUE when very first Input_file here Input_file1 is being read.
a[$0]; ##creating an array named a whose index is current line $0.
next ##next is awk out of the box keyword which will avoid the cursor to go forward and will skip all next statements.
}
($0 in a){ ##These statements will be executed when awk complete reading the first Input_file named Input_file1 name here. Checking here is $0 is in array a.
++c[$0] ##If above condition is TRUE then make an increment in array named c value whose index is current line.
}
END{ ##Starting END block of awk code here.
for(i in c){##Initiating a for loop here by which we will iterate in array c.
if(c[i]==3){ ##checking condition here if array c value is equal to 3, which means it appeared in all 4 Input_file(s).
print i ##if, yes then printing the value of i which is actually having the line which is appearing in all 4 Input_file(s).
}
}}
' Input_file1 Input_file2 Input_file3 Input_file4 ##Mentioning all the 4 Input_file(s) here.