Skip to content

Commit f095bbc

Browse files
authored
Create cat-etc-passwd.bash
This code should be usable my rbash which is the restricted version of the Bourne Again shell because it only uses shell built-ins and doesn't actually fork(), exec() or otherwise IPC any data.. it all takes place within $PPID
1 parent bf81e13 commit f095bbc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cat-etc-passwd.bash

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Ways to view /etc/passwd without using any spaces in the command
4+
#
5+
6+
# {cat,/etc/passwd}
7+
8+
mapfile</etc/passwd&&echo"${MAPFILE[*]}"
9+
10+
exit 0

0 commit comments

Comments
 (0)