쉘 명령이 완료되면 어떻게 오디오 알림을 받을 수 있나요?

쉘 명령이 완료되면 어떻게 오디오 알림을 받을 수 있나요?

이 질문은 비슷하지만 다릅니다.장기 실행 명령이 완료되면 어떻게 오디오 알림을 받을 수 있나요?.

다음과 같이 사용할 수 있는 명령을 찾고 있습니다.

mayberunlongtime; bell

이름을 기억하지 못한 채 이와 같이 작동하고 사용되는 명령이 막연하게 기억납니다.

벨을 울리는 데 사용할 수 있는 ASCII 문자가 있지만 '\a' printf를 사용하면 다소 불명확하거나 심지어 불투명해 보일 수도 있습니다. 그리고 내가 시도했을 때 작동하지 않았습니다.

나는 .zshKDE konsole

답변1

명령줄 프로그램mpg123스크립트에서 MP3 파일을 재생하는 데 사용할 수 있습니다.

High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
    version 1.22.4; written and copyright by Michael Hipp and others
    free software (LGPL) without any warranty but with best wishes

usage: mpg123 [option(s)] [file(s) | URL(s) | -]
supported options [defaults in brackets]:
   -v    increase verbosity level       -q    quiet (don't print title)
   -t    testmode (no output)           -s    write to stdout
   -w f  write output as WAV file
   -k n  skip first n frames [0]        -n n  decode only n frames [all]
   -c    check range violations         -y    DISABLE resync on errors
   -b n  output buffer: n Kbytes [0]    -f n  change scalefactor [32768]
   -r n  set/force samplerate [auto]
   -o m  select output module           -a d  set audio device
   -2    downsample 1:2 (22 kHz)        -4    downsample 1:4 (11 kHz)
   -d n  play every n'th frame only     -h n  play every frame n times
   -0    decode channel 0 (left) only   -1    decode channel 1 (right) only
   -m    mix both channels (mono)       -p p  use HTTP proxy p [$HTTP_PROXY]
   -@ f  read filenames/URLs from f     -T get realtime priority
   -z    shuffle play (with wildcards)  -Z    random play
   -u a  HTTP authentication string     -E f  Equalizer, data from file
   -C    enable control keys            --no-gapless  not skip junk/padding in mp3s
   -?    this help                      --version  print name + version

답변2

당신이 사용할 수있는 <command>; xkbbell -force. modprobe pcspkr루트로 실행해야 할 수도 있습니다 .

답변3

<command>; echo '\a'나를 위해 작동합니다.

관련 정보