Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Shell/Bash
Write a Shell Script that makes use of grep to isolate the line in /etc/passwd that contains your login details.
omid.n
Programming language:
Shell/Bash
2021-05-25 13:35:22
0
Q:
Write a Shell Script that makes use of grep to isolate the line in /etc/passwd that contains your login details.
ahmy
Code:
Shell/Bash
2021-03-09 14:37:36
# !/bin/bash username='whoami' grep "^${username}: " /etc/passwd
0
Tags
line
your
use
shell
login
make
con
pass
log
script
Related
shell promt user input
how to get specific lines of shell output
how to take input in bash
how to login to another user in powershell
bash get field from line
Using shell script, display the contents of the present working directory. If it is an ordinary file print its permission and change the permissions to r--r--r--
linux change user shell /bin/false
windows execute powershell script define user
save output of command to craible bash
how to go to end of line in shell script
show output after a keyword in shell script in a file
bash print lines that dont have a word
how to get to end of line shell
shell count lines output
New to Communities?
Join the community