created: 20230725113714725 creator: Octt modified: 20231221194135897 modifier: Octt tags: Scripting title: Shell scripting <<^wikipediaframe "Shell scripting">> * Open URL from shell: ** Windows: `start ` ** Linux desktop: `xdg-open ` ** More: https://stackoverflow.com/questions/38147620/shell-script-to-open-a-url, https://askubuntu.com/questions/515947/how-do-i-open-an-url-from-a-bash-script * [[bash/fish command to print absolute path to a file|https://stackoverflow.com/questions/3915040/how-to-obtain-the-absolute-path-of-a-file-via-shell-bash-zsh-sh#3915075]] ** `realpath example.txt # => /home/me/example.txt` * [[How do I trim leading and trailing whitespace from each line of some output?|https://unix.stackexchange.com/questions/102008/how-do-i-trim-leading-and-trailing-whitespace-from-each-line-of-some-output]] --- `awk '{$1=$1};1'`