We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cc392d commit 59f8718Copy full SHA for 59f8718
1 file changed
find_bash_users.sh
@@ -0,0 +1,12 @@
1
+#!/bin/bash
2
+
3
+FILE=${1:-/etc/passwd}
4
5
+if [ ! -f "$FILE" ]; then
6
+ echo "Error"
7
+ exit 1
8
+fi
9
10
+echo "Users in file $FILE:"
11
12
+grep '/bin/bash$' "$FILE" | cut -d: -f1
0 commit comments