📄 allprofs.sh
字号:
#!/bin/bash# allprofs.sh: print all user profiles# This script written by Heiner Steven, and modified by the document author.FILE=.bashrc # File containing user profile, #+ was ".profile" in original script.for home in `awk -F: '{print $6}' /etc/passwd`do [ -d "$home" ] || continue # If no home directory, go to next. [ -r "$home" ] || continue # If not readable, go to next. (cd $home; [ -e $FILE ] && less $FILE)done# When script terminates, there is no need to 'cd' back to original directory,#+ because 'cd $home' takes place in a subshell.exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -