There are many tools out there that promise to manage multiple runtimes and/or runtime versions, some are exclusive to a specific language, like the pyenv and others can manage multiple runtimes, but it’s not easy to switch between the versions of the same runtime, like the Homebrew (You can unlink/link, but in my opinion, it’s too unstable).
Here comes the asdf
, yes, this is the name. Simple name, simple to use! asdf
is an open-source tool under the MIT License. Currently, it supports 281 runtimes, also known as plugins. …
Replica: https://www.lozanomatheus.com/post/how-to-trigger-an-action-at-the-end-of-the-shell-bash-script
trap — ‘’ SIGTSTP
trap — ‘’ SIGTTIN
trap — ‘’ SIGTTOU
The Bash/Shell trap is a built-in command that can be used to trigger an action at the end of the script according to the signal. For example, you can use the ERR
to run a function in case something goes wrong. Use the EXIT
signal to run something every time that exists the script.
Note: Defining another action within the same signal will override the trap.
The Shell Trap built-in command and it’s available on most of the Linux and Unix distributions.
Currently, there are 65…
bash: ip: command not found
bash: ifconfig: command not found
How many times you tried to debug/troubleshoot a Linux with an unprivileged user and you didn’t have net tools or iproute installed? Well, the good news is: You can do it with Bash (ok ok, this not a bash feature :’), without having to install any package.
Many information displayed by those tools are available by the Kernel and most of them doesn’t require a privileged user. Cool, right?
In order to understand how this is possible, we’re going to explore~very shortly~ the IPv4 Routing Subsystem, in specifically…
bash: wget: command not found
bash: curl: command not found
How many times you tried to test an application or service and you couldn't because you don't have curl/wget/telnet/* installed and the user doesn't have permission to install? Well, the good news is: You can do it with Bash, by native.
One of the optional features (also a default one) for Bash is the --{enable,disable}-net-redirections. With this feature, you can send TCP or UDP requests in many ways.
If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash…
Bash tips and tricks that will save some time and lines.