This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/share/python/debpython/ | |
\ls /usr/share/python/debpython/*.py | xargs sed -i.bak '1s|^|#!/usr/bin/env python2\n|' | |
cd /usr/bin/pycompile | |
\ls /usr/bin/pycompile | xargs sed -i '1s|^|#!/usr/bin/env python2\n|' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2 | |
update-alternatives --list python | |
sudo update-alternatives --config python | |
sudo update-alternatives --set pager /bin/less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Read core number from /proc/cpuinfo and display frequency of each | |
# count the processor fields and display the number | |
awk '/processor/ {core_count++} END{print "CPU OK:", core_count, "CPUs;"}' \ | |
/proc/cpuinfo | |
# get the frequency for each core and keep track of core id via counter | |
awk 'BEGIN{printf "| "} /cpu MHz/ {print core_id++ "=" $4}' \ |