Jump to content
nisSa_miLo

Writing Bash Scripts Dlm Linux.

Recommended Posts

Soklan 1:

Logged in User Information

For all logged in users, show their real names and the time and date of their last login.

Hint: use who, lastlog, and parse /etc/passwd.

*if ade sape2 yang tau..tolong ajar saya...

saya hanya tau -- bash$ who

-- bash$ lastlog

tapi tak tau nak wat cam mana..sy tak tau apa maksud parse /etc/passwd.

PLSSS...ANYBODY HELP ME...TQ

Share this post


Link to post
Share on other sites

biasanya kita bleh dapatkan real user name dari /etc/passwd. Fields ke 5. Oleh kerana setiap field separated with colon, salah satu cara simple untuk dapatkannnya adalah dengan command cut (e.g cut -f 5 -d ":").. btw rasanya awak boleh dapatkan jawapan kalau post mesej ni kat ruangan Linux.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...