There are few people in a meeting-room and each one of them wears a blue or a grey shirt. Every person counts the number of people wearing blue shirts. You are given a single dimensional array where these counts are recorded. Find out the total number of people wearing the blue shirts? If the given array is invalid, then print "Invalid". Some of these arrays can be:
1. Count[]={2,1,1}
2. Count[]={2,2,2,2,2,2}
3. Count[]={2,10}
return code before grep
-
my 2009 solution return code before grep ( ( ( mycmd echo $? >&3 ) |grep
mytext >&4 ) 3>&1 |(read x;exit $x) )4>&1 my 2025 solution mycmd > >(grep
mytext)
1 week ago
No comments:
Post a Comment