Skip to content

Instantly share code, notes, and snippets.

View grgergo1's full-sized avatar

grgergo grgergo1

  • 08:29 (UTC +02:00)
View GitHub Profile
@grgergo1
grgergo1 / editas
Created May 25, 2022 19:50
sudoedit alternative for OpenDoas
if [[ -z $1 ]]
then
echo "Usage: $0 [FILE]"
exit 1
fi
rand=$RANDOM
file=$(basename $1)
doas cp $1 /tmp/$file.$rand 2> /dev/null
doas touch /tmp/$file.$rand