mktemp with date code example
Example 1: bash create temporary folder
#!/bin/bashtmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)echo $tmp_dir # ... rm -rf $tmp_dir
Example 2: mktemp with date
#!/bin/bashtmp_dir=$(mktemp -d -t ci-$(date +%Y-%m-%d-%H-%M-%S)-XXXXXXXXXX) echo $tmp_dir rm -rf $tmp_dir