Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeRDark
titleSet if not already defined
collapsetrue
: ${var=value}

This one is obscure....<TODO> explain!

Code Block
languagebash
themeRDark
titleSet if not defined OR set to the empty string
collapsetrue
: ${var:=value}

...

Code Block
languagebash
themeRDark
titleRecursively Copy Selected Files with Folder Structure
collapsetrue
cp --parents `find -name .pydevproject` /target_directory/

Docker

Code Block
languagebash
themeRDark
titleCheck if docker container with specified name exists
collapsetrue
docker container inspect ecl >/dev/null 2>&1
if [ $? -ne 0 ]; then
  groot-rocker-workspace --colcon --name ecl --bind /mnt/mervin/workspaces/devel/ecl:/mnt/ecl --work-directory /mnt/ecl ubuntu:22.04
else
  docker container start -i ecl
fi

Random

Code Block
languagebash
themeRDark
titleRecursively Copy Selected Files with Folder Structure
collapsetrue
# random number between 1 and 3
echo $((1 + $RANDOM % 3))

...