Skip to content

Commit e52bf4a

Browse files
authored
Add script to list users with bash shell
1 parent 04df779 commit e52bf4a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

OS.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
INPUT="password"
4+
5+
while IFS=: read -r user pass uid gid info home shell
6+
do
7+
if [[ "$shell" == "/bin/bash" ]]; then
8+
echo "$user"
9+
fi
10+
done < "$INPUT"

0 commit comments

Comments
 (0)