Example
#!/bin/bash
upower -e | grep -vi "line_power" | grep -vi "displaydevice" >> ./pwr.nfo
pwr_info=$(cat ./pwr.nfo)
echo "" > ./pwr.nfo
for i in ${pwr_info[*]}; do
upower -i $i >> ./pwr.nfo
done
# Comment
VERSION=$(uname -r)
SYSTEM=$(uname -s)
ARCHI=$(uname -m)
_DevShowTitle=""
# Comment
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title "$_DevShowTitle" --textbox ./pwr.nfo 0 0
rm -rf ./pwr.nfo
clear
exit 0
#!/bin/bash
upower -e | grep -vi "line_power" | grep -vi "displaydevice" >> ./pwr.nfo
pwr_info=$(cat ./pwr.nfo)
echo "" > ./pwr.nfo
for i in ${pwr_info[*]}; do
upower -i $i >> ./pwr.nfo
done
# Comment
VERSION=$(uname -r)
SYSTEM=$(uname -s)
ARCHI=$(uname -m)
_DevShowTitle=""
# Comment
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title "$_DevShowTitle" --textbox ./pwr.nfo 0 0
rm -rf ./pwr.nfo
clear
exit 0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def main(): pass if __name__ == '__main__': main()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pyaudio
import pathlib
def main():
log_file = pathlib.Path("./log.txt").resolve()
p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
with open(log_file, 'w') as f:
f.write(f"\n")
for i in range(0, numdevices):
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
print("Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name'))
with open(log_file, 'a') as f:
f.write(f"Input Device id: {i}, - {p.get_device_info_by_host_api_device_index(0, i).get('name')}\n")
if __name__ == '__main__':
main()
Text
Text
Text
Text
Text
Text
«»
$ $
$ Codes # Comment at, the number of #
#!/bin/bash ... script ... # echo "result"
Ну а сегодня на этом всё. Всем Добра и Удачи!
Copyright © xx.xx.xxxx by Mikhail Artamonov