Shell script that's using curl and jq to get the list of channels from @somafm, fzf to allow you to select one, and mpv to play it.
Is there any other way to break up a single string of combined options as individual options other than setting “$@“ (breaking up the string on white space), as in …
set -- $option_list
command $@ …
… ? The command is “rsync(1)” in this case if that matters.
An oddity I noticed in that script is that it uses “Bourne Again Shell”, #bash, but is not using array to collect, pass the options around. How would that be done there?
Script where you think. Emacs + shell = zero-distance hacking. No tabs, no noise. Just flow.
#Emacs #Linux #ShellScript #Productivity #DeadSwitch
http://tomsitcafe.com/2025/05/11/shell-scripts-in-emacs-the-cyber-ghosts-shortcut-to-flow/
Cada día más cerca de reemplazar a Excel 🥹
You don’t know how many personalities the #AWS #CLI has until you double-check your #disasterrecovery vendor’s work during a failover test. But hey, at least now I have a pile of #shellscript that gives me strong signals.
That’s all well and good for the #infrastructure, but we may have impeded ourselves when we gave the unproven disaster recovery environment production-like (i.e. restrictive) permissions. Diagnosing why the workloads aren’t starting up properly is unnecessarily difficult.
Bash variables: A subshell cannot write back variables to its parent shell.
I want to get a variable AA back anyway and tried:
1. in the subshell: declare -p AA >./tmp/somefile
2. in the parent shell: source ./tmp/somefile
Can this fail? Well (2) is run in a function, so the 'declare ...' we source only declares a local variable. As soon as leaving the function, the AA is gone.
There does not seem to be a version of 'declare -p' which adds "-g" to the output.
【CloudFlare】動的IPアドレスをAPIで自動更新する。DDNS #ShellScript - Qiita