Bash:修订间差异

来自OSSmedia
(创建页面,内容为“bash 是一个 shell 环境 == PS1 == # for user PS1='\[\e[94m\][\A] \[\e[93m\][\u\[\e[96m\]@\h\[\e[36m\]] \[\e[35m\][\[\e[95m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR == 1{ split($2, a," ");print a[1]}'"'"')\[\e[35m\]] \[\e[33m\][\w]\n\[\e[90m\]$? \[\e[32m\][ \$ > \[\e[93m\]' # for root PS1='\[\e[94m\][\A] \[\e[93m\][\u\[\e[96m\]@\h\[\e[36m\]] \[\e[35m\][\[\e[95m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR == 1{ split($2, a," ");print a[1]}'"'"…”)
 
无编辑摘要
第7行: 第7行:
  # for root
  # for root
  PS1='\[\e[94m\][\A] \[\e[93m\][\u\[\e[96m\]@\h\[\e[36m\]] \[\e[35m\][\[\e[95m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR == 1{ split($2, a," ");print a[1]}'"'"')\[\e[35m\]] \[\e[33m\][\w]\n\[\e[90m\]$? \[\e[31m\][ \$ > \[\e[93m\]'
  PS1='\[\e[94m\][\A] \[\e[93m\][\u\[\e[96m\]@\h\[\e[36m\]] \[\e[35m\][\[\e[95m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR == 1{ split($2, a," ");print a[1]}'"'"')\[\e[35m\]] \[\e[33m\][\w]\n\[\e[90m\]$? \[\e[31m\][ \$ > \[\e[93m\]'
== rand pass generator ==
echo $(tr -dc 'A-Za-z0-9!@#$%*' < /dev/urandom | head -c 16)

2024年12月3日 (二) 11:22的版本

bash 是一个 shell 环境

PS1

# for user
PS1='\[\e[94m\][\A] \[\e[93m\][\u\[\e[96m\]@\h\[\e[36m\]] \[\e[35m\][\[\e[95m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR == 1{  split($2, a," ");print a[1]}'"'"')\[\e[35m\]] \[\e[33m\][\w]\n\[\e[90m\]$? \[\e[32m\][ \$ > \[\e[93m\]'
# for root
PS1='\[\e[94m\][\A] \[\e[93m\][\u\[\e[96m\]@\h\[\e[36m\]] \[\e[35m\][\[\e[95m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR == 1{ split($2, a," ");print a[1]}'"'"')\[\e[35m\]] \[\e[33m\][\w]\n\[\e[90m\]$? \[\e[31m\][ \$ > \[\e[93m\]'


rand pass generator

echo $(tr -dc 'A-Za-z0-9!@#$%*' < /dev/urandom | head -c 16)