Quantcast
Channel: How do I detect if headphones are connected (via the jack) in bash? - Ask Different
Viewing all articles
Browse latest Browse all 2

Answer by HappyFace for How do I detect if headphones are connected (via the jack) in bash?

$
0
0

I found an answer from here:

if system_profiler SPAudioDataType | grep --quiet Headphones; then  echo plugged inelse  echo not plugged infi

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>