Difference between revisions of "Tput bel"

From wikieduonline
Jump to navigation Jump to search
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
  
[[tput]] bel
+
* <code>[[tput]] bel</code>
 +
* <code>[[while true]]; do [[tput bel]]; [[sleep]] 1; done</code>
 +
* <code>[[until]] true; do [[tput bel]]; [[sleep]] 1; done</code>
 +
 
 +
== Scripts ==
 +
{{check PID running}}
  
 
== Related ==
 
== Related ==
* [[afplay]]
+
* <code>[[echo -e]] '\a'</code>
* [[ffplay]]
+
* <code>[[afplay]]</code>
* [[say]] beep
+
* <code>[[ffplay]]</code>
 +
* <code>[[say]] beep</code>
 +
* [[wikipedia:Bell character]]
 +
* <code>[[zenity --info --text "hello world"]]</code>
 +
* <code>[[ping -a]]</code>
  
 
== See also ==
 
== See also ==
 
* {{tput}}
 
* {{tput}}
 +
* {{audio}}
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 13:40, 14 February 2024

Scripts[edit]

#!/bin/bash

if [ $# -eq 0 ]
then
    echo "Usage: $0 <process PID>"
    echo "Checks if a process is running by its PID."
    exit 1
fi

# Get the PID of the process to check from the command line argument
process_pid=$1

# Check if the process is running
if ps -p $process_pid > /dev/null
then
    echo "Process with PID $process_pid is running."
else
    echo "Process with PID $process_pid is not running. Running tput bel..."
    while true; do tput bel; sleep 1; done
fi

Related[edit]

See also[edit]

Advertising: