dot/scripts/mpc_add_query.sh

8 lines
206 B
Bash
Raw Normal View History

2023-11-06 10:51:50 +00:00
#!/bin/sh
query=${1}
2024-05-04 00:15:19 +00:00
mpc -f "%title%[\t\t%artist%][\t\t%album%]\t\t%file%" listall | grep -i "${query}" | rev | cut -f1 -d' ' | rev | while read -r track; do
echo "$track"
mpc insert "$track"
done