#Shorts You have been using the shell - the wrong way: Part 5
It is a prevalent practice to code for loops that need counting iteration with the help of the 'seq' command used in command-substitution. While this is okay for legacy shells (like bourne shell), all modern shells that include bash, ksh and zsh support a for-loop syntax that somewhat resembles the C syntax. In this video, you learn how to improvize the for-loop using the modern shell syntax. ... https://www.youtube.com/watch?v=evg4zZpwM2Q
Most UNIX based operating systems and Linux come equipped with 'bc' command. This tool lets you perform arbitrary precision math in a simple language syntax that is easy to learn. This tool is very much shell automation-friendly, which is an added bonus.
In this video, you will learn how to use bc and understand its features. On some Linux distributions (e.g., Ubuntu) - bc is not installed by default. Use the package manager to install them (On Ubuntu, you can use 'sudo apt install bc'). Hope you will find this video useful.
...
https://www.youtube.com/watch?v=L-g-l0Uwh8A
In this video, I will be unboxing the ADIY FLY PICO RP2040 Basic Board and setup micropython on the same. This is a board made in India and it is a clone of the official RaspberryPi PICO H. This board comes with the headers pre-soldered and hosts an extra RESET button and it costs about 100 rupees (INR) less than the official RaspberryPi PICO H board - when I bought it (October 2023).
...
https://www.youtube.com/watch?v=izioGsv3xYM
More Linux terminals emulate the xon/xoff behavior (terminal control) from the legacy UNIX systems. This can be annoying at time when you accidentally press the Ctrl+s key combination and find that your terminal is frozen.
In this video, you will learn how to control this behavior and also understand why it was used in the first place.
...
https://www.youtube.com/watch?v=Co5Gd5CzCy4
In this video, I will demonstrate how to connect a TM1637 4-digit 7-segment LED display module to a RaspberryPi Pico and program the same using micropython.
The library that you will need for this LED module can be downloaded from the URL: https://github.com/mcauser/micropython-tm1637
The actual source code for the driver can be downloaded from https://raw.githubusercontent.com/mcauser/micropython-tm1637/master/tm1637.py and saved as 'tm1637.py' into RaspberryPi Pico that has micropython installed.
...
https://www.youtube.com/watch?v=YpuNjvCDVUE
In this video, you will learn about the features of the RaspberryPi Pico and the pinout details. Sorry about the rectangle green/black block in the video recording (this was added by my desk camera setup - I will need to figure out on how to remove it).
...
https://www.youtube.com/watch?v=T83kffWUHvY
In this video, you will learn how to use the getpass() function from getpass module in python - to prompt for user input without echoing what the user types. This is useful in command-line-oriented python programs that need to prompt for a password, secret key and so on.
...
https://www.youtube.com/watch?v=tt4g8SZN1dY
The GNU coreutils package (available by default of most linux distros) comes bundled with the 'shuf' command which works as the exact opposite of the 'sort' command. It is a filter than can be used to shuffle/randomize input streams.
This video will teach you how to use this command to shuffle lines from a file and command's output and also to pick random lines from a command's output.
...
https://www.youtube.com/watch?v=XbcWybFPVYE
The modern Linux kernel does the job of running applications amongst different CPU's in a multi-core architecture quite efficiently. However, if you are setting an appliance running Linux (routers, set-top boxes and so on), where services/applications are pre-determined, it might be useful to choose the CPU for given tasks/programs manually based on their resource access patterns.
In this video, you will learn how to manage CPU affinity for a process on Linux command-line.
...
https://www.youtube.com/watch?v=Hm_wEUCdhtk
SCALARs in Perl represent basic data which technically are just strings. But when used in the right expressions, they can be coerced to numbers or proper strings. This video provides a short exploration of the same.
...
https://www.youtube.com/watch?v=7AhQw3Sgm1I