#!/bin/sh status=$(mpc status | sed -n '/playing/p' | cut -c2-8 | sed 's/^[ \t]*//') if [ "$status" = "playing" ]; then # If song is playing printf "%s\n" "S契" else printf "%s\n" "S" fi