Mercurial > ec-dotfiles
comparison rc/bashrc @ 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 |
comparison
equal
deleted
inserted
replaced
694:92c1a021e8a1 | 695:26568ef0d05a |
---|---|
279 _rm="grm" | 279 _rm="grm" |
280 else | 280 else |
281 _rm="rm" | 281 _rm="rm" |
282 fi | 282 fi |
283 # Test if the specified rm has "-I" parameter since it's much better. | 283 # Test if the specified rm has "-I" parameter since it's much better. |
284 if "${_rm}" -If "/tmp/.nonexistent.$(date '+%Y%m%d%H%M%S')" 2> /dev/null; then | 284 if "${_rm}" -If "/tmp/.nonexistent.${RANDOM}" 2> /dev/null; then |
285 alias rm="${_rm} -I" | 285 alias rm="${_rm} -I" |
286 else | 286 else |
287 alias rm="${_rm} -i" | 287 alias rm="${_rm} -i" |
288 fi | 288 fi |
289 unset _rm | 289 unset _rm |