exam questions

Exam 1z0-821 All Questions

View all questions & answers for the 1z0-821 exam

Exam 1z0-821 topic 1 question 33 discussion

Actual exam question from Oracle's 1z0-821
Question #: 33
Topic #: 1
[All 1z0-821 Questions]

A user brian is configured to use the bash shell. His home directory is /export/home/brian, and contains a .profile and a .bashrc file.
In the -profile, there are these lines:
genius =ritchie
export genius
In the .bashrc us this line:
genius=kernighan
In /etc/profile are these lines:
genius=thompson
export genius
When brian logs in and asks for the value of genius, what will he find, and why?

  • A. genius will be ritchie, because that was the value exported in .profile.
  • B. genius will be kernighan, because .bashrc executes after .profile.
  • C. genius will be ritchie because variable settings in .profile take precedence over variable settings in .bashrc.
  • D. genius will be ritchie because .profile executes after .bashrc.
  • E. genius will be thompson because /etc/profile system settings always override local settings.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dlicheri
5 months, 4 weeks ago
This is a bit of a trick question and potentially mis-leading as A gives the correct result and so does C. Always best to read completely and carefully all questions in order to come to correct answer.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago