switch with pattern at cmdline