changeset 695:26568ef0d05a

[bashrc] Use bash internal random variable
author nanaya <me@nanaya.pro>
date Sun, 23 Oct 2022 01:58:46 +0900
parents 92c1a021e8a1
children 3588f4f96c31
files rc/bashrc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rc/bashrc	Sun Oct 23 01:57:32 2022 +0900
+++ b/rc/bashrc	Sun Oct 23 01:58:46 2022 +0900
@@ -281,7 +281,7 @@
   _rm="rm"
 fi
 # Test if the specified rm has "-I" parameter since it's much better.
-if "${_rm}" -If "/tmp/.nonexistent.$(date '+%Y%m%d%H%M%S')" 2> /dev/null; then
+if "${_rm}" -If "/tmp/.nonexistent.${RANDOM}" 2> /dev/null; then
   alias rm="${_rm} -I"
 else
   alias rm="${_rm} -i"