Bash not equal string comparison

No need to use awk:-

#!/bin/bash

ipcs | while read v1 v2 skip
do
        [ "$v2" != "Semaphore" ] && echo "$v2" || break;
done

exit 0