Re: Bash Excersize

#!/bin/bash
cpulimit -e /usr/lib/firefox-esr/firefox-esr -l 30 \&
cpulimit -e "Web Content" -l 20 \&
#!/bin/bash

while [ true ]
do
    p=\$(ps aux --sort -pcpu | grep firefox)
    set - \$p
    echo "\${3:0:2}"
    if [ "\${3:0:2}" -ge 85 ]
    then
        pkill firefox
    fi
    sleep 1s
done
#!/bin/bash

while [ true ]
do
    p=\$(ps aux --sort -pcpu | grep konqueror)
    set - \$p
    echo "\${3:0:2}"
    if [ "\${3:0:2}" -ge 92 ]
    then
        pkill konqueror
    fi
    sleep 1s
done
#!/bin/bash

### BEGIN INIT INFO
# Provides:          python
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: This is for Twitter
# Description: This is for Twitter
### END INIT INFO

PATH=/bin:/sbin:/usr/sbin:/bin:/usr/bin

case \$1 in
    start)
        cd /home/david/
        start-stop-deamon --start --exec python3 twitterimage.py
        ;;
    stop)
        pkill python3
        ;;
    restart|reload|*)
        pkill python3
        cd /home/david/
        start-stop-deamon --start --exec python3 twitterimage.py
        ;;
esac
#!/bin/basn

l=\$(ls /dev/video*)
set - \$l
echo "\$1"
vlc v4l2:// :input-slave=alsa:// :v4l2-standard=1 :v4l2-dev="\$1" :v4l2-width=1280 :v4l2-height=720 :sout="#transcode{vcodec=theo,vb=1000,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{dst=:8081/webcam.ogg}" -I dummy