#!/bin/bash
# Do you like it? Follow me on telegram: https://t.me/linuxcheatsheet
# Very basic script to launch a browser without any cache or cookie preloaded
# It needs firefox and chromium installed (or change 'chromium' to 'chrome' it you use it)
TMPPROF="$(mktemp -d)"
mkdir "${TMPPROF}/cache"
export XDG_CACHE_HOME="${TMPPROF}/cache"
case $1 in
f)
firefox -profile "$TMPPROF" -new-instance "https://duckduckgo.com"
;;
c)
chromium --user-data-dir="$TMPPROF" "https://duckduckgo.com/"
;;
*)
echo -e "launch with\n$0 c or $0 f\nfor chromium or firefox"
;;
esac
[ -d "$TMPPROF" ] && rm -rf "$TMPPROF"
exit 0